OpenGL Volumizer 2.7 Reference Pages


NAME
vzParameterVertexData - Parameter representing per vertex values.

INHERITS FROM
vzParameter

HEADER FILE
#include <Volumizer2/ParameterVertexData.h>

PUBLIC METHOD SUMMARY
vzParameterVertexData ( int numVertices, int valuesPerVertex, float* solutionValues);
void setDataPtr ( int numVertices, int valuesPerVertex, float* solutionValues);
float* getDataPtr (  ) const;
int getNumValuesPerVertex (  ) const;
int getNumVertices (  ) const;
void getDataRange ( int value, float range[2]);

PROTECTED METHOD SUMMARY
virtual ~vzParameterVertexData (  );

CLASS DESCRIPTION
vzParameterVertexData represents per vertex values associated with a mesh. Each vertex in the mesh can have any number of floating point values associated with it. These values are specified in an interleaved manner for each of the vertices. For example, the Plot3D solution file format stores the following values: density, x_momentum, y_momentum, z_momentum and energy.

METHOD DESCRIPTIONS

   vzParameterVertexData()
vzParameterVertexData ( int numVertices, int valuesPerVertex, float* solutionValues);

Constructor for vzParameterVertexData class. The constructor does not allocate any memory either for the vertex values. Calls setDataPtr() with numVertices, valuesPerVertex and solutionValues as arguments.

   ~vzParameterVertexData()
virtual ~vzParameterVertexData (  );

Destructor for vertex data parameters.

   getDataPtr()
float* getDataPtr (  ) const;

Return the array of solution values for all the vertices. The data is returned in the form: (vertex 1 solution 1, vertex 1 solution 2, vertex 1 solution 3 . . ., vertex 2 solution 1, vertex 2 solution 2, ...)

   getDataRange()
void getDataRange ( int value, float range[2]);

Get the range of data values in the solution field.

   getNumValuesPerVertex()
int getNumValuesPerVertex (  ) const;

Returns the number of values per vertex in the mesh.

   getNumVertices()
int getNumVertices (  ) const;

Get the number of vertices in the solution field.

   setDataPtr()
void setDataPtr ( int numVertices, int valuesPerVertex, float* solutionValues);

Set all of the valuesPerVertex solution values for all the vertices. solutionValues should be of size numValues * numVertices, where numVertices is the number of vertices in the given mesh and numValues is the number of solution values per vertex. Note: The pointer solutionValues is shallow copied. No memory allocation takes place internally. The user is responsible for allocating and deallocating the memory for the pointer.

The data should be passed in the form:

(vertex 1 solution 1, vertex 1 solution 2, vertex 1 solution 3 . . .,
vertex 2 solution 1, vertex 2 solution 2, ...)


SEE ALSO
vzParameter, vzParameterVertexData

Back to Index