directory Struct Reference
[librt geometry, raytracing]

#include <raytrace.h>

Collaboration diagram for directory:

Collaboration graph
[legend]

Data Fields

long d_magic
 Magic number.
char * d_namep
 pointer to name string
union {
   long   file_offset
 disk address in obj file
   genptr_t   ptr
 ptr to in-memory-only obj
d_un
directoryd_forw
 link to next dir entry
animated_animate
 link to animation
long d_uses
 # uses, from instancing
long d_len
 # of db granules used
long d_nref
 # times ref'ed by COMBs
int d_flags
 flags
unsigned char d_major_type
 object major type
unsigned char d_minor_type
 object minor type
bu_list d_use_hd
 heads list of uses (struct soltab l2)
char d_shortname [16]
 Stash short names locally.

Detailed Description

D I R E C T O R Y

One of these structures is allocated in memory to represent each named object in the database.

Note that a d_addr of RT_DIR_PHONY_ADDR (-1L) means that database storage has not been allocated yet.

Note that there is special handling for RT_DIR_INMEM "in memory" overrides.

Construction should be done only by using RT_GET_DIRECTORY() Destruction should be done only by using db_dirdelete().

Special note: In order to reduce the overhead of calling bu_malloc() (really bu_strdup()) to stash the name in d_namep, we carry along enough storage for small names right in the structure itself (d_shortname). Thus, d_namep should never be assigned to directly, it should always be accessed using RT_DIR_SET_NAMEP() and RT_DIR_FREE_NAMEP().

The in-memory name of an object should only be changed using db_rename(), so that it can be requeued on the correct linked list, based on new hash. This should be followed by rt_db_put_internal() on the object to modify the on-disk name.

Definition at line 841 of file raytrace.h.


Field Documentation

long d_magic
 

Magic number.

Definition at line 842 of file raytrace.h.

Referenced by db_update_ident().

char* d_namep
 

pointer to name string

Definition at line 843 of file raytrace.h.

Referenced by bend_pipe_shot(), classify_seg(), db5_realloc(), db5_replace_attributes(), db5_update_attributes(), db_add_anim(), db_apply_anims(), db_delete(), db_detect_cycle(), db_dircheck(), db_dump(), db_follow_path(), db_full_path_appendresult(), db_functree(), db_get(), db_get_external(), db_getmrec(), db_lookup(), db_lookup_by_attr(), db_path_to_string(), db_path_to_vls(), db_pr_dir(), db_preorder_traverse(), db_put(), db_put_external(), db_put_external5(), db_recurse(), db_recurse_subtree(), db_regexp_match_all(), db_zapper(), dgo_build_tops(), Do_copy_membs(), main(), nmg_booltree_leaf_tess(), nmg_booltree_leaf_tnurb(), rt_arb_setup(), rt_ars_prep(), rt_bound_tree(), rt_db_get_internal(), rt_db_get_internal5(), rt_db_lookup_internal(), rt_db_put_internal(), rt_db_put_internal5(), rt_eto_shot(), rt_find_paths(), rt_free_soltab(), rt_gettree_leaf(), rt_gettrees_muves(), rt_part_prep(), rt_pipe_hitsort(), rt_pipe_shot(), rt_pr_pt_vls(), rt_pr_tree_str(), rt_submodel_a_hit(), rt_submodel_norm(), rt_submodel_prep(), rt_superell_shot(), rt_tcl_import_from_path(), rt_tcl_pr_hit(), rt_tor_shot(), rt_tree_kill_dead_solid_refs(), wdb_attr_cmd(), wdb_binary_cmd(), wdb_combadd(), wdb_get_obj_bounds2(), wdb_identitize(), wdb_killall_cmd(), wdb_move_all_cmd(), wdb_push_cmd(), wdb_remove_cmd(), wdb_vls_col_pr4v(), and wdb_vls_long_dpp().

long file_offset
 

disk address in obj file

Definition at line 845 of file raytrace.h.

Referenced by db5_diradd(), db_diradd(), and db_diradd5().

genptr_t ptr
 

ptr to in-memory-only obj

Definition at line 846 of file raytrace.h.

Referenced by db5_realloc(), db5_write_free(), db_delete(), db_diradd5(), db_get(), db_get_external(), db_getmrec(), db_inmem(), db_put(), db_put_external(), db_put_external5(), and rt_db_put_internal5().

union { ... } d_un
 

Referenced by db5_diradd(), db5_realloc(), db5_write_free(), db_delete(), db_diradd(), db_diradd5(), db_get(), db_get_external(), db_getmrec(), db_inmem(), db_put(), db_put_external(), db_put_external5(), and rt_db_put_internal5().

struct directory* d_forw
 

link to next dir entry

Definition at line 848 of file raytrace.h.

Referenced by db5_diradd(), db_ck_directory(), db_close(), db_diradd(), db_diradd5(), db_dircheck(), db_dirdelete(), db_dump(), db_free_anim(), db_get_directory_size(), db_lookup(), db_pr_dir(), db_regexp_match_all(), db_rename(), db_update_nref(), wdb_find_cmd(), wdb_keep_cmd(), wdb_killall_cmd(), wdb_move_all_cmd(), wdb_rmap_cmd(), wdb_tops_cmd(), and wdb_xpush_cmd().

struct animate* d_animate
 

link to animation

Definition at line 849 of file raytrace.h.

Referenced by db5_diradd(), db_add_anim(), db_apply_anims(), db_diradd(), db_diradd5(), db_free_anim(), and db_pr_dir().

long d_uses
 

# uses, from instancing

Definition at line 850 of file raytrace.h.

Referenced by db5_diradd(), db_diradd(), db_diradd5(), db_pr_dir(), rt_find_identical_solid(), and wdb_xpush_cmd().

long d_len
 

# of db granules used

Definition at line 851 of file raytrace.h.

Referenced by db5_diradd(), db5_realloc(), db_delete(), db_diradd(), db_diradd5(), db_functree(), db_get(), db_get_external(), db_getmrec(), db_inmem(), db_pr_dir(), db_preorder_traverse(), db_put(), db_put_external(), db_put_external5(), db_update_ident(), db_zapper(), and rt_db_put_internal5().

long d_nref
 

# times ref'ed by COMBs

Definition at line 852 of file raytrace.h.

Referenced by db5_diradd(), db_count_refs(), db_diradd(), db_diradd5(), db_pr_dir(), db_update_nref(), Do_ref_incr(), wdb_keep_cmd(), wdb_tops_cmd(), and wdb_xpush_cmd().

int d_flags
 

flags

Definition at line 853 of file raytrace.h.

Referenced by db5_diradd(), db5_realloc(), db5_write_free(), db_delete(), db_diradd(), db_diradd5(), db_follow_path(), db_functree(), db_get(), db_get_external(), db_getmrec(), db_inmem(), db_lookup_by_attr(), db_pr_dir(), db_preorder_traverse(), db_put(), db_put_external(), db_put_external5(), db_recurse(), db_update_ident(), db_zapper(), rt_db_get_internal(), rt_db_put_internal5(), wdb_comb_cmd(), wdb_comb_std_cmd(), wdb_combadd(), wdb_copy_cmd(), wdb_export_external(), wdb_find_cmd(), wdb_identitize(), wdb_killall_cmd(), wdb_nmg_collapse_cmd(), wdb_ocenter_cmd(), wdb_orotate_cmd(), wdb_oscale_cmd(), wdb_otranslate_cmd(), wdb_remove_cmd(), wdb_rmap_cmd(), wdb_showmats_cmd(), wdb_vls_col_pr4v(), wdb_vls_line_dpp(), wdb_vls_long_dpp(), wdb_whatid_cmd(), and wdb_xpush_cmd().

unsigned char d_major_type
 

object major type

Definition at line 854 of file raytrace.h.

Referenced by db5_diradd(), db5_update_ident(), db_diradd(), db_diradd5(), db_update_nref(), wdb_binary_cmd(), wdb_concat_cmd(), wdb_move_all_cmd(), and wdb_vls_long_dpp().

unsigned char d_minor_type
 

object minor type

Definition at line 855 of file raytrace.h.

Referenced by db5_diradd(), db_diradd(), db_diradd5(), db_update_nref(), wdb_copy_cmd(), wdb_move_all_cmd(), and wdb_vls_long_dpp().

struct bu_list d_use_hd
 

heads list of uses (struct soltab l2)

Definition at line 856 of file raytrace.h.

Referenced by db5_diradd(), db_diradd(), and db_diradd5().

char d_shortname[16]
 

Stash short names locally.

Definition at line 857 of file raytrace.h.


The documentation for this struct was generated from the following file:
Generated on Mon Sep 18 01:25:11 2006 for BRL-CAD by  doxygen 1.4.6