Collaboration diagram for Tolerances:


This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.

## Data Structures

struct  bn_tol
Support for uniform tolerances. More...

## Macros

#define BN_CK_TOL(_p)   BU_CKMAG(_p, BN_TOL_MAGIC, "bn_tol")

#define BN_TOL_INIT(_p)

#define BN_TOL_INIT_ZERO   { BN_TOL_MAGIC, 0.0, 0.0, 0.0, 1.0 }

#define BN_TOL_IS_INITIALIZED(_p)   (((struct bn_tol *)(_p) != (struct bn_tol *)0) && LIKELY((_p)->magic == BN_TOL_MAGIC))

#define BN_TOL_DIST   0.0005

#define BN_VECT_ARE_PARALLEL(_dot, _tol)   (((_dot) <= -SMALL_FASTF) ? (NEAR_EQUAL((_dot), -1.0, (_tol)->perp)) : (NEAR_EQUAL((_dot), 1.0, (_tol)->perp)))

#define BN_VECT_ARE_PERP(_dot, _tol)   (((_dot) < 0) ? ((-(_dot))<=(_tol)->perp) : ((_dot) <= (_tol)->perp))

## Macro Definition Documentation

 #define BN_TOL_INIT ( _p )
Value:
{ \
(_p)->magic = BN_TOL_MAGIC; \
(_p)->dist = 0.0; \
(_p)->dist_sq = 0.0; \
(_p)->perp = 0.0; \
(_p)->para = 1.0; \
}
#define BN_TOL_MAGIC
Definition: magic.h:74
oldeumate l2 magic
Definition: nmg_mod.c:3843

initializes a bn_tol struct to zero without allocating any memory.

Definition at line 87 of file tol.h.

 #define BN_TOL_INIT_ZERO   { BN_TOL_MAGIC, 0.0, 0.0, 0.0, 1.0 }

macro suitable for declaration statement zero-initialization of a bn_tol struct.

Definition at line 99 of file tol.h.

 #define BN_TOL_IS_INITIALIZED ( _p ) (((struct bn_tol *)(_p) != (struct bn_tol *)0) && LIKELY((_p)->magic == BN_TOL_MAGIC))

returns truthfully whether a bn_tol struct has been initialized.

Definition at line 104 of file tol.h.

 #define BN_TOL_DIST   0.0005

replaces the hard coded tolerance value

Definition at line 109 of file tol.h.

 #define BN_VECT_ARE_PARALLEL ( _dot, _tol ) (((_dot) <= -SMALL_FASTF) ? (NEAR_EQUAL((_dot), -1.0, (_tol)->perp)) : (NEAR_EQUAL((_dot), 1.0, (_tol)->perp)))

returns truthfully whether a given dot-product of two unspecified vectors are within a specified parallel tolerance.

Definition at line 115 of file tol.h.

Referenced by bn_dist_line3_line3(), rt_arbn_plot(), and rt_arbn_prep().

 #define BN_VECT_ARE_PERP ( _dot, _tol ) (((_dot) < 0) ? ((-(_dot))<=(_tol)->perp) : ((_dot) <= (_tol)->perp))

returns truthfully whether a given dot-product of two unspecified vectors are within a specified perpendicularity tolerance.

Definition at line 122 of file tol.h.