Tolerances
[libbn (numerical functions)]

Collaboration diagram for Tolerances:

Data Structures

struct  bn_tol
 Support for uniform tolerances. More...

Defines

#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_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))

Detailed Description


Define Documentation

#define BN_CK_TOL ( _p   )     BU_CKMAG(_p, BN_TOL_MAGIC, "bn_tol")
#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; \
    }

initializes a bn_tol struct to zero without allocating any memory.

Definition at line 120 of file bn.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 132 of file bn.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 137 of file bn.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 143 of file bn.h.

Referenced by bn_dist_line3_line3().

#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 150 of file bn.h.

Generated on Tue Dec 11 13:14:30 2012 for LIBBN by  doxygen 1.6.3