Common definitions for the headers used in nmg.h (i.e. the headers found in include/nmg)
More...
|
#define | NMG_BOOL_SUB 1 |
| subtraction More...
|
|
#define | NMG_BOOL_ADD 2 |
| addition/union More...
|
|
#define | NMG_BOOL_ISECT 4 |
| intersection More...
|
|
#define | NMG_CLASS_Unknown -1 |
|
#define | NMG_CLASS_AinB 0 |
|
#define | NMG_CLASS_AonBshared 1 |
|
#define | NMG_CLASS_AonBanti 2 |
|
#define | NMG_CLASS_AoutB 3 |
|
#define | NMG_CLASS_BinA 4 |
|
#define | NMG_CLASS_BonAshared 5 |
|
#define | NMG_CLASS_BonAanti 6 |
|
#define | NMG_CLASS_BoutA 7 |
|
#define | OT_NONE 0 |
| no orientation (error) More...
|
|
#define | OT_SAME 1 |
| orientation same More...
|
|
#define | OT_OPPOSITE 2 |
| orientation opposite More...
|
|
#define | OT_UNSPEC 3 |
| orientation unspecified More...
|
|
#define | OT_BOOLPLACE 4 |
| object is intermediate data for boolean ops More...
|
|
#define | NMG_FPI_FIRST 0 |
| return after finding first touch More...
|
|
#define | NMG_FPI_PERGEOM 1 |
| find all touches, call user funcs once for each geometry element touched. More...
|
|
#define | NMG_FPI_PERUSE 2 |
| find all touches, call user funcs once for each use of geom elements touched. More...
|
|
#define | NMG_GETSTRUCT(p, str) p = (struct str *)bu_calloc(1, sizeof(struct str), "NMG_GETSTRUCT") |
|
#define | NMG_FREESTRUCT(p, str) bu_free(p, "NMG_FREESTRUCT") |
|
#define | NMG_ALLOC(_ptr, _type) _ptr = (_type *)bu_calloc(1, sizeof(_type), #_type " (NMG_ALLOC) " CPP_FILELINE) |
|
#define | NMG_CKMAG(_ptr, _magic, _str) BU_CKMAG(_ptr, _magic, _str) |
|
#define | NMG_CK2MAG(_ptr, _magic1, _magic2, _str) |
|
#define | NMG_CK_LIST(_p) BU_CKMAG(_p, BU_LIST_HEAD_MAGIC, "bu_list") |
|
#define | NMG_CK_RADIAL(_p) NMG_CKMAG(_p, NMG_RADIAL_MAGIC, "nmg_radial") |
|
#define | NMG_CK_INTER_STRUCT(_p) NMG_CKMAG(_p, NMG_INTER_STRUCT_MAGIC, "nmg_inter_struct") |
|
#define | NMG_INCR_INDEX(_p, _m) NMG_CK_MODEL(_m); (_p)->index = ((_m)->maxindex)++ |
|
Common definitions for the headers used in nmg.h (i.e. the headers found in include/nmg)
- NOTE: We rely on the fact that the first 32 bits in a struct is the magic number (which is used to identify the struct type). This may be either a magic value, or an rt_list structure, which starts with a magic number.
To these ends, there is a standard ordering for fields in "object-use" structures. That ordering is:
1) magic number, or rt_list structure 2) pointer to parent 5) pointer to mate 6) pointer to geometry 7) pointer to attributes 8) pointer to child(ren)
◆ NMG_BOOL_SUB
◆ NMG_BOOL_ADD
addition/union
Definition at line 63 of file defines.h.
◆ NMG_BOOL_ISECT
◆ NMG_CLASS_Unknown
#define NMG_CLASS_Unknown -1 |
◆ NMG_CLASS_AinB
◆ NMG_CLASS_AonBshared
#define NMG_CLASS_AonBshared 1 |
◆ NMG_CLASS_AonBanti
#define NMG_CLASS_AonBanti 2 |
◆ NMG_CLASS_AoutB
#define NMG_CLASS_AoutB 3 |
◆ NMG_CLASS_BinA
◆ NMG_CLASS_BonAshared
#define NMG_CLASS_BonAshared 5 |
◆ NMG_CLASS_BonAanti
#define NMG_CLASS_BonAanti 6 |
◆ NMG_CLASS_BoutA
#define NMG_CLASS_BoutA 7 |
◆ OT_NONE
no orientation (error)
Definition at line 78 of file defines.h.
◆ OT_SAME
orientation same
Definition at line 79 of file defines.h.
◆ OT_OPPOSITE
orientation opposite
Definition at line 80 of file defines.h.
◆ OT_UNSPEC
orientation unspecified
Definition at line 81 of file defines.h.
◆ OT_BOOLPLACE
object is intermediate data for boolean ops
Definition at line 82 of file defines.h.
◆ NMG_FPI_FIRST
return after finding first touch
values for the "allhits" argument to mg_class_pt_fu_except()
Definition at line 87 of file defines.h.
◆ NMG_FPI_PERGEOM
#define NMG_FPI_PERGEOM 1 |
find all touches, call user funcs once for each geometry element touched.
Definition at line 91 of file defines.h.
◆ NMG_FPI_PERUSE
find all touches, call user funcs once for each use of geom elements touched.
Definition at line 95 of file defines.h.
◆ NMG_GETSTRUCT
#define NMG_GETSTRUCT |
( |
|
p, |
|
|
|
str |
|
) |
| p = (struct str *)bu_calloc(1, sizeof(struct str), "NMG_GETSTRUCT") |
storage allocation/deallocation support
Definition at line 100 of file defines.h.
◆ NMG_FREESTRUCT
#define NMG_FREESTRUCT |
( |
|
p, |
|
|
|
str |
|
) |
| bu_free(p, "NMG_FREESTRUCT") |
◆ NMG_ALLOC
#define NMG_ALLOC |
( |
|
_ptr, |
|
|
|
_type |
|
) |
| _ptr = (_type *)bu_calloc(1, sizeof(_type), #_type " (NMG_ALLOC) " CPP_FILELINE) |
◆ NMG_CKMAG
#define NMG_CKMAG |
( |
|
_ptr, |
|
|
|
_magic, |
|
|
|
_str |
|
) |
| BU_CKMAG(_ptr, _magic, _str) |
macros to check/validate a structure pointer
Definition at line 107 of file defines.h.
◆ NMG_CK2MAG
#define NMG_CK2MAG |
( |
|
_ptr, |
|
|
|
_magic1, |
|
|
|
_magic2, |
|
|
|
_str |
|
) |
| |
Value: if (!(_ptr) || (*((uint32_t *)(_ptr)) != (_magic1) && *((uint32_t *)(_ptr)) != (_magic2))) { \
bu_badmagic((uint32_t *)(_ptr), _magic1, _str, __FILE__, __LINE__); \
}
Definition at line 108 of file defines.h.
◆ NMG_CK_LIST
◆ NMG_CK_RADIAL
◆ NMG_CK_INTER_STRUCT
◆ NMG_INCR_INDEX
#define NMG_INCR_INDEX |
( |
|
_p, |
|
|
|
_m |
|
) |
| NMG_CK_MODEL(_m); (_p)->index = ((_m)->maxindex)++ |