BRL-CAD
db_i Struct Reference

#include <raytrace.h>

Collaboration diagram for db_i:
[legend]

Data Fields

uint32_t dbi_magic
 magic number More...
 
char * dbi_filename
 file name More...
 
int dbi_read_only
 !0 => read only file More...
 
double dbi_local2base
 local2mm More...
 
double dbi_base2local
 unit conversion factors More...
 
char * dbi_title
 title from IDENT rec More...
 
char ** dbi_filepath
 search path for aux file opens (convenience var) More...
 
struct directorydbi_Head [RT_DBNHASH]
 
FILE * dbi_fp
 PRIVATE: object hash table. More...
 
off_t dbi_eof
 PRIVATE: End+1 pos after db_scan() More...
 
size_t dbi_nrec
 PRIVATE: # records after db_scan() More...
 
int dbi_uses
 PRIVATE: # of uses of this struct. More...
 
struct mem_mapdbi_freep
 PRIVATE: map of free granules. More...
 
void * dbi_inmem
 PRIVATE: ptr to in-memory copy. More...
 
struct animatedbi_anroot
 PRIVATE: heads list of anim at root lvl. More...
 
struct bu_mapped_filedbi_mf
 PRIVATE: Only in read-only mode. More...
 
struct bu_ptbl dbi_clients
 PRIVATE: List of rtip's using this db_i. More...
 
int dbi_version
 PRIVATE: use db_version() More...
 
struct rt_wdbdbi_wdbp
 PRIVATE: ptr back to containing rt_wdb. More...
 

Detailed Description

One of these structures is used to describe each separate instance of a BRL-CAD model database ".g" file.

dbi_filepath is a C-style argv array of places to search when opening related files (such as data files for EBM solids or texture-maps). The array and strings are all dynamically allocated.

Note that the current working units are specified as a conversion factor to/from millimeters (they are the 'base' in local2base and base2local) because database dimensional values are always stored as millimeters (mm). The units conversion factor only affects the display and conversion of input values. This helps prevent error accumulation and improves numerical stability when calculations are made.

Definition at line 800 of file raytrace.h.

Field Documentation

uint32_t dbi_magic

magic number

Definition at line 801 of file raytrace.h.

Referenced by db_open(), db_open_inmem(), and ged_open().

char** dbi_filepath

search path for aux file opens (convenience var)

Definition at line 810 of file raytrace.h.

Referenced by db_close(), db_open(), db_open_inmem(), ged_open(), get_file_data(), img_load_datasource(), new_image(), rt_ebm_import4(), rt_ebm_import5(), and txt_load_datasource().

FILE* dbi_fp

PRIVATE: object hash table.

PRIVATE: standard file pointer

Definition at line 815 of file raytrace.h.

Referenced by db5_scan(), db_close(), db_dirbuild(), db_open(), db_open_inmem(), db_read(), db_scan(), db_sync(), db_version(), db_write(), and ged_open().

off_t dbi_eof

PRIVATE: End+1 pos after db_scan()

Definition at line 816 of file raytrace.h.

Referenced by db5_realloc(), db5_scan(), db_alloc(), db_open(), db_open_inmem(), db_read(), db_scan(), ged_open(), and rt_mk_binunif().

size_t dbi_nrec

PRIVATE: # records after db_scan()

Definition at line 817 of file raytrace.h.

Referenced by db5_scan(), db_alloc(), and db_scan().

int dbi_uses

PRIVATE: # of uses of this struct.

Definition at line 818 of file raytrace.h.

Referenced by db_clone_dbi(), db_close(), db_open(), db_open_inmem(), ged_open(), and rt_prep_parallel().

struct mem_map* dbi_freep

PRIVATE: map of free granules.

Definition at line 819 of file raytrace.h.

Referenced by db5_diradd_handler(), db5_realloc(), db_alloc(), db_close(), db_delete(), db_scan(), ged_concat(), ged_dup(), and ged_memprint().

void* dbi_inmem

PRIVATE: ptr to in-memory copy.

Definition at line 820 of file raytrace.h.

Referenced by db5_scan(), db_close(), db_open(), db_read(), and db_write().

struct animate* dbi_anroot

PRIVATE: heads list of anim at root lvl.

Definition at line 821 of file raytrace.h.

Referenced by db_add_anim(), db_follow_path(), and db_free_anim().

struct bu_mapped_file* dbi_mf

PRIVATE: Only in read-only mode.

Definition at line 822 of file raytrace.h.

Referenced by db5_scan(), db_close(), db_open(), db_open_inmem(), ged_open(), and rt_submodel_prep().

struct bu_ptbl dbi_clients

PRIVATE: List of rtip's using this db_i.

Definition at line 823 of file raytrace.h.

Referenced by db_clone_dbi(), db_close(), db_close_client(), db_open(), db_open_inmem(), ged_open(), and rt_submodel_prep().

struct rt_wdb* dbi_wdbp

PRIVATE: ptr back to containing rt_wdb.

Definition at line 825 of file raytrace.h.

Referenced by db_create_inmem(), db_open_inmem(), gcv_execute(), and wdb_init().


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