BRL-CAD

Common definitions for the headers used in nmg.h (i.e. the headers found in include/nmg) More...

Collaboration diagram for Definitions:

Files

file  defines.h
 

Macros

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

Detailed Description

Common definitions for the headers used in nmg.h (i.e. the headers found in include/nmg)

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)

Macro Definition Documentation

◆ NMG_BOOL_SUB

#define NMG_BOOL_SUB   1

subtraction

Definition at line 62 of file defines.h.

◆ NMG_BOOL_ADD

#define NMG_BOOL_ADD   2

addition/union

Definition at line 63 of file defines.h.

◆ NMG_BOOL_ISECT

#define NMG_BOOL_ISECT   4

intersection

Definition at line 64 of file defines.h.

◆ NMG_CLASS_Unknown

#define NMG_CLASS_Unknown   -1

Definition at line 67 of file defines.h.

◆ NMG_CLASS_AinB

#define NMG_CLASS_AinB   0

Definition at line 68 of file defines.h.

◆ NMG_CLASS_AonBshared

#define NMG_CLASS_AonBshared   1

Definition at line 69 of file defines.h.

◆ NMG_CLASS_AonBanti

#define NMG_CLASS_AonBanti   2

Definition at line 70 of file defines.h.

◆ NMG_CLASS_AoutB

#define NMG_CLASS_AoutB   3

Definition at line 71 of file defines.h.

◆ NMG_CLASS_BinA

#define NMG_CLASS_BinA   4

Definition at line 72 of file defines.h.

◆ NMG_CLASS_BonAshared

#define NMG_CLASS_BonAshared   5

Definition at line 73 of file defines.h.

◆ NMG_CLASS_BonAanti

#define NMG_CLASS_BonAanti   6

Definition at line 74 of file defines.h.

◆ NMG_CLASS_BoutA

#define NMG_CLASS_BoutA   7

Definition at line 75 of file defines.h.

◆ OT_NONE

#define OT_NONE   0

no orientation (error)

Definition at line 78 of file defines.h.

◆ OT_SAME

#define OT_SAME   1

orientation same

Definition at line 79 of file defines.h.

◆ OT_OPPOSITE

#define OT_OPPOSITE   2

orientation opposite

Definition at line 80 of file defines.h.

◆ OT_UNSPEC

#define OT_UNSPEC   3

orientation unspecified

Definition at line 81 of file defines.h.

◆ OT_BOOLPLACE

#define OT_BOOLPLACE   4

object is intermediate data for boolean ops

Definition at line 82 of file defines.h.

◆ NMG_FPI_FIRST

#define NMG_FPI_FIRST   0

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

#define NMG_FPI_PERUSE   2

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")

Definition at line 101 of file defines.h.

◆ NMG_ALLOC

#define NMG_ALLOC (   _ptr,
  _type 
)    _ptr = (_type *)bu_calloc(1, sizeof(_type), #_type " (NMG_ALLOC) " CPP_FILELINE)

Definition at line 102 of file defines.h.

◆ 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

#define NMG_CK_LIST (   _p)    BU_CKMAG(_p, BU_LIST_HEAD_MAGIC, "bu_list")

Definition at line 113 of file defines.h.

◆ NMG_CK_RADIAL

#define NMG_CK_RADIAL (   _p)    NMG_CKMAG(_p, NMG_RADIAL_MAGIC, "nmg_radial")

Definition at line 114 of file defines.h.

◆ NMG_CK_INTER_STRUCT

#define NMG_CK_INTER_STRUCT (   _p)    NMG_CKMAG(_p, NMG_INTER_STRUCT_MAGIC, "nmg_inter_struct")

Definition at line 115 of file defines.h.

◆ NMG_INCR_INDEX

#define NMG_INCR_INDEX (   _p,
  _m 
)     NMG_CK_MODEL(_m); (_p)->index = ((_m)->maxindex)++

Definition at line 124 of file defines.h.