81#define RT_DIR_NULL ((struct directory *)0)
82#define RT_CK_DIR(_dp) BU_CKMAG(_dp, RT_DIR_MAGIC, "(librt)directory")
84#define d_addr d_un.file_offset
85#define RT_DIR_PHONY_ADDR ((b_off_t)-1)
88#define RT_DIR_SOLID 0x1
89#define RT_DIR_COMB 0x2
90#define RT_DIR_REGION 0x4
91#define RT_DIR_HIDDEN 0x8
92#define RT_DIR_NON_GEOM 0x10
93#define RT_DIR_USED 0x80
94#define RT_DIR_INMEM 0x100
100#define FOR_ALL_DIRECTORY_START(_dp, _dbip) { int _i; \
101 for (_i = RT_DBNHASH-1; _i >= 0; _i--) { \
102 for ((_dp) = (_dbip)->dbi_Head[_i]; (_dp); (_dp) = (_dp)->d_forw) {
104#define FOR_ALL_DIRECTORY_END }}}
106#define RT_DIR_SET_NAMEP(_dp, _name) { \
107 if (strlen(_name) < sizeof((_dp)->d_shortname)) {\
108 bu_strlcpy((_dp)->d_shortname, (_name), sizeof((_dp)->d_shortname)); \
109 (_dp)->d_namep = (_dp)->d_shortname; \
111 (_dp)->d_namep = bu_strdup(_name); \
119#define RT_DIR_FREE_NAMEP(_dp) { \
120 if ((_dp)->d_namep != (_dp)->d_shortname) \
121 bu_free((_dp)->d_namep, "d_namep"); \
122 (_dp)->d_namep = NULL; }
129#define RT_GET_DIRECTORY(_p, _res) { \
130 while (((_p) = (_res)->re_directory_hd) == NULL) \
131 db_alloc_directory_block(_res); \
132 (_res)->re_directory_hd = (_p)->d_forw; \
133 (_p)->d_forw = NULL; }
Header file for the BRL-CAD common definitions.
struct directory ** db_argv_to_dpv(const struct db_i *dbip, const char **argv)
char ** db_dpv_to_argv(struct directory **dpv)
union directory::@11 d_un
char * d_namep
pointer to name string
uint32_t d_magic
Magic number.
b_off_t file_offset
disk address in obj file
char d_shortname[16]
Stash short names locally.
unsigned char d_minor_type
object minor type
long d_nref
number of times ref'ed by COMBs
size_t d_len
number of of db granules used
struct animate * d_animate
link to animation
void * u_data
void pointer hook for user data. user is responsible for freeing.
struct bu_list d_use_hd
heads list of uses (struct soltab l2)
unsigned char d_major_type
object major type
void * ptr
ptr to in-memory-only obj
struct directory * d_forw
link to next dir entry
long d_uses
number of uses, from instancing
fundamental vector, matrix, quaternion math macros