OpenGL Volumizer 2.7 Reference Pages


NAME
vzVertexArray - An array of floating-point vertex coordinates.

INHERITS FROM
vzObject

HEADER FILE
#include <Volumizer2/VertexArray.h>

PUBLIC METHOD SUMMARY
vzVertexArray ( int numVertices, float* vertices);
void setDataPtr ( int numVertices, float* vertices);
float* getDataPtr (  ) const;
int getNumVertices (  );
void computeBoundingBox ( float bbox[6]) const;

PROTECTED METHOD SUMMARY
virtual ~vzVertexArray (  );

CLASS DESCRIPTION
vzVertexArray provides an abstraction for storing an array of vertex coordinates. Stores a user data pointer for an array of floats, but does not perform any memory allocation.

METHOD DESCRIPTIONS

   vzVertexArray()
vzVertexArray ( int numVertices, float* vertices);

Constructor for vzVertexArray. Calls setDataPtr() with numVertices and vertices as arguments.

   ~vzVertexArray()
virtual ~vzVertexArray (  );

Destructor for vzVertexArray.

   computeBoundingBox()
void computeBoundingBox ( float bbox[6]) const;

Compute and return the bounding box for the given set of vertices. The first three floating point values in bbox give the corresponding x, y and z coordinates of the lower bound and the next three give the upper bound.

   getDataPtr()
float* getDataPtr (  ) const;

Return the pointer to the array of vertices.

   getNumVertices()
int getNumVertices (  );

Return the number of vertices in the array.

   setDataPtr()
void setDataPtr ( int numVertices, float* vertices);

Set the list of numVertices vertices of the model to the specified values. Values should be provided in the form (x1,y1,z1,x2,y2,z2,...) setDataPtr performs a shallow copy of vertices: no memory allocation is performed. The method also marks the vertex data as dirty, invoking all notification callbacks. You must call this method whenever you modify vertex data.

SEE ALSO
vzObject, vzVertexArray

Back to Index