vert_tree.c File Reference

Routines to manage a binary search tree of vertices. More...

#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "bn.h"
Include dependency graph for vert_tree.c:

Go to the source code of this file.

Data Structures

union  vert_tree
struct  vert_leaf
struct  vert_node

Defines

#define VERT_LEAF   'l'
#define VERT_NODE   'n'

Functions

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

Detailed Description

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.

Definition in file vert_tree.c.

Generated on Tue Dec 11 13:14:28 2012 for LIBBN by  doxygen 1.6.3