VoxelFarm::CFastQuadrics Class Reference

An efficient mesh representation that features Quadratic Error function simplification using a Multiple-Choice Algorithm. More...

#include <FastQuadrics.h>

Public Member Functions

void allocate (int vertCount, int faceCount)
 Allocates memory for the vertex and face arrays. More...
 
void release ()
 Releases memory held by this mesh.
 
void resize ()
 Allows one to resize the container to hold vertexCount verts and faceCount faces.
 
void swap (CFastQuadrics &mesh)
 Swaps one CFastQuadrics with another.
 
void copy (CFastQuadrics &mesh)
 Copies the mesh parameter to the mesh.
 
void append (CFastQuadrics &mesh)
 Appends the mesh parameter to the mesh.
 
int addVertex (double x, double y, double z, int type, double maxerror=1000000.0, int external=0, unsigned short flags=0)
 Adds a vertex to the mesh. More...
 
void addFace (int vid0, int vid1, int vid2, int material)
 Adds a triangle to the mesh. More...
 

Public Attributes

FQ_Vertexvertices
 Array of vertices in the mesh.
 
FQ_Facefaces
 Array of faces in the mesh.
 
CFaceLinkfaceIndex
 Array of all nodes in adjancency lists.
 
int vertexCount
 Number of vertices in the mesh.
 
int faceCount
 Number of faces in the mesh.
 
int faceLinkCount
 Number of adjancency links in the mesh.
 
bool fastBuild
 Set to true to skip building adjancency lists.
 

Detailed Description

An efficient mesh representation that features Quadratic Error function simplification using a Multiple-Choice Algorithm.

Definition at line 44 of file FastQuadrics.h.

Member Function Documentation

void VoxelFarm::CFastQuadrics::addFace ( int  vid0,
int  vid1,
int  vid2,
int  material 
)

Adds a triangle to the mesh.

Parameters
vid0Index for the first vertex in the triangle
vid1Index for the second vertex in the triangle
vid2Index for the third vertex in the triangle
materialA m aterial indentifier. Can be chosen by the application.
int VoxelFarm::CFastQuadrics::addVertex ( double  x,
double  y,
double  z,
int  type,
double  maxerror = 1000000.0,
int  external = 0,
unsigned short  flags = 0 
)

Adds a vertex to the mesh.

Parameters
xX coordinate for the new vertex
yY coordinate for the new vertex
zZ coordinate for the new vertex
typeA type holder for the vertex. Can be chosen by the application.
maxerrorMaximum simplification error the vertex will allow
externalAn external application-specific buffer
flagsThe vertex flags determined during contouring
void VoxelFarm::CFastQuadrics::allocate ( int  vertCount,
int  faceCount 
)

Allocates memory for the vertex and face arrays.

Parameters
vertCountNumber of vertices to be allocated
faceCountNumber of faces to be allocated

The documentation for this class was generated from the following file: