directory Struct Reference

#include <raytrace.h>

Collaboration diagram for directory:

Data Fields

uint32_t d_magic
 Magic number. More...
char * d_namep
 pointer to name string More...
union {
   off_t   file_offset
 disk address in obj file More...
   void *   ptr
 ptr to in-memory-only obj More...
struct directoryd_forw
 link to next dir entry More...
struct animated_animate
 link to animation More...
long d_uses

uses, from instancing

size_t d_len

of db granules used

long d_nref

times ref'ed by COMBs

int d_flags
 flags More...
unsigned char d_major_type
 object major type More...
unsigned char d_minor_type
 object minor type More...
struct bu_list d_use_hd
 heads list of uses (struct soltab l2) More...
char d_shortname [16]
 Stash short names locally. More...

Detailed Description

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 ((off_t)-1) 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 acquiring heap memory (e.g., via 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 857 of file raytrace.h.

Field Documentation

uint32_t d_magic

Magic number.

Definition at line 858 of file raytrace.h.

Referenced by color_putrec(), color_zaprec(), db_alloc_directory_block(), and db_update_ident().

char* d_namep

pointer to name string

Definition at line 859 of file raytrace.h.

Referenced by _db_recurse_subtree(), _db_search_full_paths(), _ged_bot_dump(), _ged_combadd(), _ged_combadd2(), _ged_do_list(), _ged_print_node(), _ged_vls_col_pr4v(), _rt_find_identical_solid(), _rt_gettree_leaf(), _rt_tree_kill_dead_solid_refs(), add_solid(), bare_comb_node(), bend_pipe_shot(), build_comb(), check_hitstate(), classify_seg(), color_shader_clear(), comb_flatten(), comb_lift_region(), comb_tree_clear(), comb_wrap(), constraint_eval(), constraint_get(), constraint_set(), constraint_show(), cyclic_path(), db5_realloc(), db5_replace_attributes(), db5_sync_attr_to_comb(), db5_update_attributes(), db_add_anim(), db_alloc(), db_apply_anims(), db_argv_to_dpv(), db_delete(), db_delrec(), db_diff(), db_diff3(), db_dircheck(), db_dirdelete(), db_dpv_to_argv(), db_dump(), db_follow_path(), db_full_path_appendresult(), db_fullpath_to_vls(), db_functree(), db_get(), db_get_external(), db_getmrec(), db_lookup(), db_lookup_by_attr(), db_ls(), 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_regexp_match_all(), db_rename(), db_update_nref(), db_zapper(), discont_radius_shot(), dl_botdump(), edcodes_collect_regnames(), edit_arg_to_apparent_coord(), edit_translate(), f_iname(), f_name(), fix_halfs(), full_region_node(), ged_arced(), ged_attr(), ged_bo(), ged_bot_dump(), ged_bot_face_sort(), ged_clone(), ged_comb(), ged_copyeval(), ged_copymat(), ged_dbcopy(), ged_draw_guts(), ged_eac(), ged_erase(), ged_expand(), ged_find(), ged_get_comb(), ged_getmat(), ged_glob(), ged_hide(), ged_inside(), ged_killrefs(), ged_lc(), ged_list(), ged_match(), ged_mater(), ged_pathsum(), ged_push(), ged_put_comb(), ged_red(), ged_region(), ged_remove(), ged_rmap(), ged_search(), ged_sphgroup(), ged_trace(), ged_unhide(), ged_which(), ged_which_shader(), ged_wmater(), ged_xpush(), get_densities_from_database(), get_diff_components(), killtree_callback(), linear_pipe_shot(), main(), move_all_func(), name_compare(), nmg_2_vrml(), nmg_booltree_leaf_tess(), nmg_booltree_leaf_tnurb(), node_write(), obj_vlist(), path_validate_recurse(), phong_render(), pipe_end_shot(), pipe_start_shot(), print_path_with_bools(), pull_comb(), region_flag_clear(), region_flag_set(), rt_arb_setup(), rt_ars_prep(), rt_bound_internal(), 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_extrude_prep(), rt_extrude_shot(), rt_find_paths(), rt_free_soltab(), rt_gettrees_muves(), rt_hrt_shot(), rt_part_prep(), rt_pipe_shot(), rt_pr_pt_vls(), rt_pr_seg_vls(), rt_pr_soltab(), rt_pr_tree(), rt_pr_tree_str(), rt_pr_tree_val(), rt_pr_tree_vls(), rt_revolve_shot(), rt_submodel_a_hit(), rt_submodel_norm(), rt_submodel_prep(), rt_superell_shot(), rt_tcl_import_from_path(), rt_tcl_pr_hit(), rt_tgc_shot(), rt_tor_shot(), rt_traverse_tree(), solid_node(), tables_new(), tthrm_render(), unprep_leaf(), unresolved(), wcodes_printcodes(), wdb_import_from_path2(), and XGLUE().

off_t file_offset

disk address in obj file

Definition at line 861 of file raytrace.h.

struct animate* d_animate

link to animation

Definition at line 865 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
int d_flags


Definition at line 869 of file raytrace.h.

Referenced by _ged_combadd2(), _ged_print_node(), _ged_vls_col_pr4v(), _rt_gettree_leaf(), attr_pretty_print(), characterize_dp(), color_putrec(), color_zaprec(), comb_lift_region(), comb_wrap(), combmem_set_empty(), db5_diradd(), db5_realloc(), db5_sync_attr_to_comb(), db5_write_free(), db_alloc(), db_close(), db_comb_mvall(), db_delete(), db_diradd(), db_diradd5(), db_dirdelete(), db_dump(), db_follow_path(), db_fullpath_list(), db_fullpath_list_subtree(), db_fullpath_to_vls(), 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_search(), db_update_ident(), db_update_nref(), db_zapper(), dp_eval_flags(), edcodes_collect_regnames(), edcodes_traverse_node(), edit_arg_to_apparent_coord(), edit_translate(), f_nnodes(), f_type(), full_assembly_node(), full_comb_node(), ged_arced(), ged_attr(), ged_bot_dump(), ged_comb(), ged_comb_std(), ged_copy(), ged_copyeval(), ged_copymat(), ged_cpi(), ged_dbcopy(), ged_eac(), ged_find(), ged_get_comb(), ged_getmat(), ged_hide(), ged_killrefs(), ged_ls(), ged_mirror(), ged_nmg_collapse(), ged_ocenter(), ged_orotate(), ged_oscale(), ged_otranslate(), ged_path_validate(), ged_prefix(), ged_pull(), ged_put_comb(), ged_rcodes(), ged_red(), ged_region(), ged_remove(), ged_rmap(), ged_sphgroup(), ged_tops(), ged_trace(), ged_unhide(), ged_whatid(), ged_which(), ged_which_shader(), ged_wmater(), ged_xpush(), killtree_callback(), move_all_func(), nmg_2_vrml(), path_validate_recurse(), pull_comb(), region_flag_clear(), region_flag_set(), rt_db_get_internal(), rt_db_put_internal5(), rt_find_paths(), tables_new(), wcodes_printcodes(), wcodes_printnode(), and wdb_export_external().

unsigned char d_minor_type
struct bu_list d_use_hd

heads list of uses (struct soltab l2)

Definition at line 872 of file raytrace.h.

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

char d_shortname[16]

Stash short names locally.

Definition at line 873 of file raytrace.h.

The documentation for this struct was generated from the following file: