BRL-CAD
|
GED Database Format v4. More...
Go to the source code of this file.
Data Structures | |
struct | ident |
struct | solidrec |
struct | combination |
struct | member |
struct | material_rec |
struct | B_solid |
struct | b_surf |
struct | polyhead |
struct | polydata |
struct | ars_rec |
struct | ars_ext |
struct | strsol |
struct | arbn_rec |
struct | exported_pipe_pnt |
struct | pipewire_rec |
struct | particle_rec |
struct | extr_rec |
struct | sketch_rec |
struct | annot_rec |
struct | script_rec |
struct | cline_rec |
struct | bot_rec |
union | record |
Typedefs | |
typedef float | dbfloat_t |
Functions | |
DEPRECATED void | rt_fastf_float (fastf_t *ff, const dbfloat_t *fp, int n, int flip) |
DEPRECATED void | rt_mat_dbmat (fastf_t *ff, const dbfloat_t *dbp, int flip) |
DEPRECATED void | rt_dbmat_mat (dbfloat_t *dbp, const fastf_t *ff) |
GED Database Format v4.
All records are rounded up to have a fixed length; each such database record is also known as a "granule", and is the smallest unit of database storage.
Every granule can be identified by the first byte, which can be accessed by the u_id name. Note that the u_id field is not valid when writing the actual data for splines.
Each granule is read into a "union record", and is then processed based on the value of u_id. Each granule will have one of these formats: A Free record An ID record A SOLID record A COMBINATION record, followed by multiple MEMBER records An ARS ‘A’ (header) record, followed by multiple ARS ‘B’ (data) records A Polygon header record, followed by multiple Polygon data records A B-spline solid header record, followed by multiple B-spline surface records, followed by d_kv_size[0] floats, d_kv_size[1] floats, padded to d_nknots granules, followed by ctl_size[0]*ctl_size[1]*geom_type floats, padded to d_nctls granules.
The records are stored as binary records corresponding to PDP-11 and VAX C structs, so padding must be supplied explicitly for alignment.
For the time being, the representation of the floating point numbers in the database is machine-specific, requiring conversion to ASCII (via g2asc) and back to binary (via asc2g) when exchanging between machines of dissimilar types. In time, an external representation for floats might be implemented.
Definition in file db4.h.
#define ID_NO_UNIT 0 /* unspecified */ |
#define ID_MM_UNIT 1 /* millimeters (preferred) */ |
#define ID_CM_UNIT 2 /* centimeters */ |
#define ID_UM_UNIT 6 /* micrometers */ |
#define ID_KM_UNIT 7 /* kilometers */ |
#define RPP 1 /* axis-aligned rectangular parallelepiped */ |
#define BOX 2 /* arbitrary rectangular parallelepiped */ |
#define ARB4 4 /* tetrahedron */ |
#define ARB8 8 /* hexahedron */ |
#define GENARB8 20 /* generalized ARB8: V, and 7 other vectors */ |
#define ARS 21 /* HACK arbitrary triangular-surfaced polyhedron */ |
#define EPA 28 /* Elliptical Paraboloid */ |
#define EHY 29 /* Elliptical Hyperboloid */ |
#define ETO 30 /* Elliptical Torus */ |
#define SUPERELL 32 /* Superquadratic Ellipsoid */ |
#define DBID_ANNOT 'a' /* 2D annotations */ |