78#define RT_DIR_NULL ((struct directory *)0)
79#define RT_CK_DIR(_dp) BU_CKMAG(_dp, RT_DIR_MAGIC, "(librt)directory")
81#define d_addr d_un.file_offset
82#define RT_DIR_PHONY_ADDR ((b_off_t)-1)
85#define RT_DIR_SOLID 0x1
86#define RT_DIR_COMB 0x2
87#define RT_DIR_REGION 0x4
88#define RT_DIR_HIDDEN 0x8
89#define RT_DIR_NON_GEOM 0x10
90#define RT_DIR_USED 0x80
91#define RT_DIR_INMEM 0x100
97#define FOR_ALL_DIRECTORY_START(_dp, _dbip) { int _i; \
98 for (_i = RT_DBNHASH-1; _i >= 0; _i--) { \
99 for ((_dp) = (_dbip)->dbi_Head[_i]; (_dp); (_dp) = (_dp)->d_forw) {
101#define FOR_ALL_DIRECTORY_END }}}
103#define RT_DIR_SET_NAMEP(_dp, _name) { \
104 if (strlen(_name) < sizeof((_dp)->d_shortname)) {\
105 bu_strlcpy((_dp)->d_shortname, (_name), sizeof((_dp)->d_shortname)); \
106 (_dp)->d_namep = (_dp)->d_shortname; \
108 (_dp)->d_namep = bu_strdup(_name); \
116#define RT_DIR_FREE_NAMEP(_dp) { \
117 if ((_dp)->d_namep != (_dp)->d_shortname) \
118 bu_free((_dp)->d_namep, "d_namep"); \
119 (_dp)->d_namep = NULL; }
126#define RT_GET_DIRECTORY(_p, _res) { \
127 while (((_p) = (_res)->re_directory_hd) == NULL) \
128 db_alloc_directory_block(_res); \
129 (_res)->re_directory_hd = (_p)->d_forw; \
130 (_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