BRL-CAD
|
Files | |
file | vert_tree.h |
Data Structures | |
struct | bg_vert_tree |
Macros | |
#define | BN_VERT_TREE_TYPE_VERTS 1 |
#define | BN_VERT_TREE_TYPE_VERTS_AND_NORMS 2 |
#define | BN_CK_VERT_TREE(_p) BU_CKMAG(_p, BN_VERT_TREE_MAGIC, "vert_tree") |
Functions | |
struct bg_vert_tree * | bg_vert_tree_create (void) |
routine to create a vertex tree. More... | |
struct bg_vert_tree * | bg_vert_tree_create_w_norms (void) |
routine to create a vertex tree. More... | |
void | bg_vert_tree_destroy (struct bg_vert_tree *tree) |
Routine to free a vertex tree and all associated dynamic memory. More... | |
size_t | bg_vert_tree_add (struct bg_vert_tree *tree, double x, double y, double z, fastf_t local_tol_sq) |
Routine to add a vertex to the current list of part vertices. The array is re-alloc'd if needed. Returns index into the array of vertices where this vertex is stored. More... | |
size_t | bg_vert_tree_add_w_norm (struct bg_vert_tree *tree, double x, double y, double z, double nx, double ny, double nz, fastf_t local_tol_sq) |
Routine to add a vertex and a normal to the current list of part vertices. The array is re-alloc'd if needed. Returns index into the array of vertices where this vertex and normal is stored. More... | |
void | bg_vert_tree_clean (struct bg_vert_tree *tree) |
Routine to free the binary search tree and reset the current number of vertices. The vertex array is left untouched, for re-use later. More... | |
Routines to manage a binary search tree of vertices.
The actual vertices are stored in an array for convenient use by routines such as "mk_bot". The binary search tree stores indices into the array.
#define BN_VERT_TREE_TYPE_VERTS 1 |
Definition at line 59 of file vert_tree.h.
#define BN_VERT_TREE_TYPE_VERTS_AND_NORMS 2 |
Definition at line 60 of file vert_tree.h.
#define BN_CK_VERT_TREE | ( | _p | ) | BU_CKMAG(_p, BN_VERT_TREE_MAGIC, "vert_tree") |
Definition at line 62 of file vert_tree.h.
struct bg_vert_tree * bg_vert_tree_create | ( | void | ) |
routine to create a vertex tree.
Possible refinements include specifying an initial size
struct bg_vert_tree * bg_vert_tree_create_w_norms | ( | void | ) |
routine to create a vertex tree.
Possible refinements include specifying an initial size
void bg_vert_tree_destroy | ( | struct bg_vert_tree * | tree | ) |
Routine to free a vertex tree and all associated dynamic memory.
size_t bg_vert_tree_add | ( | struct bg_vert_tree * | tree, |
double | x, | ||
double | y, | ||
double | z, | ||
fastf_t | local_tol_sq | ||
) |
Routine to add a vertex to the current list of part vertices. The array is re-alloc'd if needed. Returns index into the array of vertices where this vertex is stored.
size_t bg_vert_tree_add_w_norm | ( | struct bg_vert_tree * | tree, |
double | x, | ||
double | y, | ||
double | z, | ||
double | nx, | ||
double | ny, | ||
double | nz, | ||
fastf_t | local_tol_sq | ||
) |
Routine to add a vertex and a normal to the current list of part vertices. The array is re-alloc'd if needed. Returns index into the array of vertices where this vertex and normal is stored.
void bg_vert_tree_clean | ( | struct bg_vert_tree * | tree | ) |
Routine to free the binary search tree and reset the current number of vertices. The vertex array is left untouched, for re-use later.