BRL-CAD
vert_tree.h File Reference
#include "common.h"
#include "bn/defines.h"
#include "bu/magic.h"
Include dependency graph for vert_tree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vert_root
 Vertex tree support Routines to manage a binary search tree of vertices. More...
 

Macros

#define TREE_TYPE_VERTS   1
 
#define TREE_TYPE_VERTS_AND_NORMS   2
 
#define VERT_BLOCK   512
 number of vertices to malloc per call when building the array More...
 
#define BN_CK_VERT_TREE(_p)   BU_CKMAG(_p, VERT_TREE_MAGIC, "vert_tree")
 

Functions

struct vert_rootcreate_vert_tree (void)
 routine to create a vertex tree. More...
 
struct vert_rootcreate_vert_tree_w_norms (void)
 routine to create a vertex tree. More...
 
void free_vert_tree (struct vert_root *tree_root)
 Routine to free a vertex tree and all associated dynamic memory. More...
 
int Add_vert (double x, double y, double z, struct vert_root *tree_root, 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...
 
int Add_vert_and_norm (double x, double y, double z, double nx, double ny, double nz, struct vert_root *tree_root, 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 clean_vert_tree (struct vert_root *tree_root)
 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...