BRL-CAD
#include "common.h"
#include "bu/magic.h"
#include "bu/bitv.h"
#include "bu/list.h"
#include "bn.h"
#include "raytrace.h"
#include "rtgeom.h"
Include dependency graph for wdb.h:

Go to the source code of this file.

Data Structures

struct  wmember
 

Macros

#define WMEMBER_INIT_ZERO   { BU_LIST_INIT_ZERO, 0, MAT_INIT_IDN, NULL }
 
#define WMEMBER_INIT(x)   { BU_LIST_INIT(&((x)->l)); (x)->wm_op = 0; MAT_IDN((x)->wm_mat); (x)->wm_name = NULL; }
 
#define WMEMBER_NULL   ((struct wmember *)0)
 
#define WDB_CK_WMEMBER(_p)   BU_CKMAG(_p, WMEMBER_MAGIC, "wmember" );
 
#define mk_lcomb(_fp, _name, _headp, _rf, _shadername, _shaderargs, _rgb, _inh)
 
#define mk_lrcomb(fp, name, _headp, region_flag, shadername, shaderargs, rgb, id, air, material, los, inherit_flag)
 
#define WMOP_INTERSECT   DB_OP_INTERSECT
 
#define WMOP_SUBTRACT   DB_OP_SUBTRACT
 
#define WMOP_UNION   DB_OP_UNION
 
#define mk_lfcomb(fp, name, headp, region)
 
#define mk_export_fwrite(wdbp, name, gp, id)   wdb_export(wdbp, name, gp, id, mk_conv2mm)
 

Enumerations

enum  wdb_binunif {
  WDB_BINUNIF_FLOAT, WDB_BINUNIF_DOUBLE, WDB_BINUNIF_CHAR, WDB_BINUNIF_UCHAR,
  WDB_BINUNIF_SHORT, WDB_BINUNIF_USHORT, WDB_BINUNIF_INT, WDB_BINUNIF_UINT,
  WDB_BINUNIF_LONG, WDB_BINUNIF_ULONG, WDB_BINUNIF_LONGLONG, WDB_BINUNIF_ULONGLONG,
  WDB_BINUNIF_INT8, WDB_BINUNIF_UINT8, WDB_BINUNIF_INT16, WDB_BINUNIF_UINT16,
  WDB_BINUNIF_INT32, WDB_BINUNIF_UINT32, WDB_BINUNIF_INT64, WDB_BINUNIF_UINT64,
  WDB_BINUNIF_FILE_FLOAT, WDB_BINUNIF_FILE_DOUBLE, WDB_BINUNIF_FILE_CHAR, WDB_BINUNIF_FILE_UCHAR,
  WDB_BINUNIF_FILE_SHORT, WDB_BINUNIF_FILE_USHORT, WDB_BINUNIF_FILE_INT, WDB_BINUNIF_FILE_UINT,
  WDB_BINUNIF_FILE_LONG, WDB_BINUNIF_FILE_ULONG, WDB_BINUNIF_FILE_LONGLONG, WDB_BINUNIF_FILE_ULONGLONG,
  WDB_BINUNIF_FILE_INT8, WDB_BINUNIF_FILE_UINT8, WDB_BINUNIF_FILE_INT16, WDB_BINUNIF_FILE_UINT16,
  WDB_BINUNIF_FILE_INT32, WDB_BINUNIF_FILE_UINT32, WDB_BINUNIF_FILE_INT64, WDB_BINUNIF_FILE_UINT64
}
 

Functions

int mk_id (struct rt_wdb *fp, const char *title)
 
int mk_id_units (struct rt_wdb *fp, const char *title, const char *units)
 
int mk_id_editunits (struct rt_wdb *fp, const char *title, double local2mm)
 
int mk_half (struct rt_wdb *fp, const char *name, const vect_t norm, fastf_t d)
 
int mk_grip (struct rt_wdb *wdbp, const char *name, const point_t center, const vect_t normal, const fastf_t magnitude)
 
int mk_rpp (struct rt_wdb *fp, const char *name, const point_t min, const point_t max)
 
int mk_wedge (struct rt_wdb *fp, const char *name, const point_t vert, const vect_t xdirv, const vect_t zdirv, fastf_t xlen, fastf_t ylen, fastf_t zlen, fastf_t x_top_len)
 
int mk_arb4 (struct rt_wdb *fp, const char *name, const fastf_t *pts4)
 
int mk_arb5 (struct rt_wdb *fp, const char *name, const fastf_t *pts5)
 
int mk_arb6 (struct rt_wdb *fp, const char *name, const fastf_t *pts6)
 
int mk_arb7 (struct rt_wdb *fp, const char *name, const fastf_t *pts7)
 
int mk_arb8 (struct rt_wdb *fp, const char *name, const fastf_t *pts8)
 
int mk_sph (struct rt_wdb *fp, const char *name, const point_t center, fastf_t radius)
 
int mk_ell (struct rt_wdb *fp, const char *name, const point_t center, const vect_t a, const vect_t b, const vect_t c)
 
int mk_tor (struct rt_wdb *fp, const char *name, const point_t center, const vect_t inorm, double r1, double r2)
 
int mk_rcc (struct rt_wdb *fp, const char *name, const point_t base, const vect_t height, fastf_t radius)
 
int mk_tgc (struct rt_wdb *fp, const char *name, const point_t base, const vect_t height, const vect_t a, const vect_t b, const vect_t c, const vect_t d)
 
int mk_cone (struct rt_wdb *fp, const char *name, const point_t base, const vect_t dirv, fastf_t height, fastf_t rad1, fastf_t rad2)
 
int mk_trc_h (struct rt_wdb *fp, const char *name, const point_t base, const vect_t height, fastf_t radbase, fastf_t radtop)
 
int mk_trc_top (struct rt_wdb *fp, const char *name, const point_t ibase, const point_t itop, fastf_t radbase, fastf_t radtop)
 
int mk_rpc (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t height, const vect_t breadth, double half_w)
 
int mk_rhc (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t height, const vect_t breadth, fastf_t half_w, fastf_t asymp)
 
int mk_epa (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t height, const vect_t breadth, fastf_t r1, fastf_t r2)
 
int mk_ehy (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t height, const vect_t breadth, fastf_t r1, fastf_t r2, fastf_t c)
 
int mk_hyp (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t height_vector, const vect_t vectA, fastf_t magB, fastf_t base_neck_ratio)
 
int mk_eto (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t norm, const vect_t smajor, fastf_t rrot, fastf_t sminor)
 
int mk_metaball (struct rt_wdb *wdbp, const char *name, const size_t nctlpt, const int method, const fastf_t threshold, const fastf_t *verts[5])
 
int mk_arbn (struct rt_wdb *fp, const char *name, size_t neqn, const plane_t *eqn)
 
int mk_ars (struct rt_wdb *fp, const char *name, size_t ncurves, size_t pts_per_curve, fastf_t *curves[])
 
int mk_constraint (struct rt_wdb *wdbp, const char *name, const char *expr)
 
int mk_binunif (struct rt_wdb *fp, const char *name, const void *data, wdb_binunif data_type, long count)
 
int mk_bot (struct rt_wdb *fp, const char *name, unsigned char mode, unsigned char orientation, unsigned char error_mode, size_t num_vertices, size_t num_faces, fastf_t *vertices, int *faces, fastf_t *thickness, struct bu_bitv *face_mode)
 
int mk_bot_w_normals (struct rt_wdb *fp, const char *name, unsigned char mode, unsigned char orientation, unsigned char flags, size_t num_vertices, size_t num_faces, const fastf_t *vertices, const int *faces, const fastf_t *thickness, struct bu_bitv *face_mode, size_t num_normals, fastf_t *normals, int *face_normals)
 
int mk_brep (struct rt_wdb *wdbp, const char *name, ON_Brep *brep)
 
int mk_bspline (struct rt_wdb *wdbp, const char *name, struct face_g_snurb **surfs)
 
int mk_nmg (struct rt_wdb *filep, const char *name, struct model *m)
 
int mk_bot_from_nmg (struct rt_wdb *ofp, const char *name, struct shell *s)
 
int mk_sketch (struct rt_wdb *fp, const char *name, const struct rt_sketch_internal *skt)
 
int mk_extrusion (struct rt_wdb *fp, const char *name, const char *sketch_name, const point_t V, const vect_t h, const vect_t u_vec, const vect_t v_vec, int keypoint)
 
int mk_cline (struct rt_wdb *fp, const char *name, const point_t V, const vect_t height, fastf_t radius, fastf_t thickness)
 
int mk_particle (struct rt_wdb *fp, const char *name, point_t vertex, vect_t height, double vradius, double hradius)
 
int mk_pipe (struct rt_wdb *fp, const char *name, struct bu_list *headp)
 
void mk_pipe_free (struct bu_list *headp)
 
void mk_add_pipe_pt (struct bu_list *headp, const point_t coord, double od, double id, double bendradius)
 
void mk_pipe_init (struct bu_list *headp)
 
int mk_dsp (struct rt_wdb *fp, const char *name, const char *file, size_t xdim, size_t ydim, const matp_t mat)
 
int mk_ebm (struct rt_wdb *fp, const char *name, const char *file, size_t xdim, size_t ydim, fastf_t tallness, const matp_t mat)
 
int mk_hrt (struct rt_wdb *fp, const char *name, const point_t center, const vect_t x, const vect_t y, const vect_t z, const fastf_t dist)
 
int mk_vol (struct rt_wdb *fp, const char *name, const char *file, size_t xdim, size_t ydim, size_t zdim, size_t lo, size_t hi, const vect_t cellsize, const matp_t mat)
 
int mk_submodel (struct rt_wdb *fp, const char *name, const char *file, const char *treetop, int meth)
 
int mk_write_color_table (struct rt_wdb *ofp)
 
struct wmembermk_addmember (const char *name, struct bu_list *headp, mat_t mat, int op)
 
int mk_comb (struct rt_wdb *wdbp, const char *combname, struct bu_list *headp, int region_kind, const char *shadername, const char *shaderargs, const unsigned char *rgb, int id, int air, int material, int los, int inherit, int append_ok, int gift_semantics)
 
int mk_comb1 (struct rt_wdb *fp, const char *combname, const char *membname, int regflag)
 
int mk_region1 (struct rt_wdb *fp, const char *combname, const char *membname, const char *shadername, const char *shaderargs, const unsigned char *rgb)
 
int mk_conversion (char *units_string)
 
int mk_set_conversion (double val)
 
void mk_freemembers (struct bu_list *headp)
 
int make_hole (struct rt_wdb *wdbp, point_t hole_start, vect_t hole_depth, fastf_t hole_radius, int num_objs, struct directory **dp)
 
int make_hole_in_prepped_regions (struct rt_wdb *wdbp, struct rt_i *rtip, point_t hole_start, vect_t hole_depth, fastf_t radius, struct bu_ptbl *regions)
 

Variables

double mk_conv2mm
 Conversion factor to mm. More...
 
int mk_version
 Which version database to write. More...
 

Detailed Description

Interface structures and routines for libwdb

Note - Rather than using a stdio (FILE *), we now use a (struct rt_wdb *) parameter. Rather than calling fopen(), call wdb_fopen();

Definition in file wdb.h.