HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GA_WorkVertexBuffer Class Reference

#include <GA_WorkVertexBuffer.h>

Public Member Functions

 GA_WorkVertexBuffer (GA_VertexPool &pool, GA_Size size=0, GA_Size matrix_number_colums=GA_MAXORDER)
 
virtual ~GA_WorkVertexBuffer ()
 Virtual solely for GEO backward compatibility. More...
 
void clear ()
 Release all the vertices. More...
 
void growBuffer (GA_Size newsize)
 
void reserve (GA_Size num_elems)
 
GA_Offset appendVertexOffset (GA_Offset point=GA_INVALID_OFFSET)
 
GA_Offset appendPointOffset ()
 Append a single temporary point. More...
 
void appendVertices (GA_Offset *buffer, GA_Size n)
 Allocate N vertices in the provided buffer. More...
 
void appendPoints (GA_Offset *buffer, GA_Size n)
 Allocate N points into the provided buffer. More...
 
GA_VertexPoolgetVertexPool () const
 
GA_Offset getBasisVertexOffset (GA_Size r, GA_Size c, GA_Offset pt=GA_INVALID_OFFSET)
 
GA_Size getMatrixSize () const
 The matrix size is the number of columns in the 2D array of vertices. More...
 
void swapVertices (GA_Size i1, GA_Size i2)
 
GA_Offset getVertexOffset (GA_Size idx, GA_Offset pt=GA_INVALID_OFFSET)
 
GA_Offset getVertexOffset (GA_Size idx) const
 
GA_Size getVertexEntries () const
 

Detailed Description

Definition at line 21 of file GA_WorkVertexBuffer.h.

Constructor & Destructor Documentation

GA_WorkVertexBuffer::GA_WorkVertexBuffer ( GA_VertexPool pool,
GA_Size  size = 0,
GA_Size  matrix_number_colums = GA_MAXORDER 
)

Construct a buffer of temporary vertices/points for a given detail. Thes vertices can be used for intermediate computations. The size parameter specifies the initial allocation size of the buffer.

When the vertex buffer represents a 2D array of vertices, the matrix_number_columns variable specifies the number of columns in the array (i.e. nu).

virtual GA_WorkVertexBuffer::~GA_WorkVertexBuffer ( )
virtual

Virtual solely for GEO backward compatibility.

Member Function Documentation

GA_Offset GA_WorkVertexBuffer::appendPointOffset ( )

Append a single temporary point.

void GA_WorkVertexBuffer::appendPoints ( GA_Offset buffer,
GA_Size  n 
)
inline

Allocate N points into the provided buffer.

Definition at line 75 of file GA_WorkVertexBuffer.h.

GA_Offset GA_WorkVertexBuffer::appendVertexOffset ( GA_Offset  point = GA_INVALID_OFFSET)

Append a single vertex. If a point is not specified, a temporary point will be created to handle point attributes.

void GA_WorkVertexBuffer::appendVertices ( GA_Offset buffer,
GA_Size  n 
)
inline

Allocate N vertices in the provided buffer.

Definition at line 67 of file GA_WorkVertexBuffer.h.

void GA_WorkVertexBuffer::clear ( )

Release all the vertices.

GA_Offset GA_WorkVertexBuffer::getBasisVertexOffset ( GA_Size  r,
GA_Size  c,
GA_Offset  pt = GA_INVALID_OFFSET 
)
inline

Get a vertex in a mesh (rather than a linear array). This uses the MatrixSize to determine the number of columns in the matrix.

Definition at line 91 of file GA_WorkVertexBuffer.h.

GA_Size GA_WorkVertexBuffer::getMatrixSize ( ) const
inline

The matrix size is the number of columns in the 2D array of vertices.

Definition at line 95 of file GA_WorkVertexBuffer.h.

GA_Size GA_WorkVertexBuffer::getVertexEntries ( ) const
inline

Query

Definition at line 86 of file GA_WorkVertexBuffer.h.

GA_Offset GA_WorkVertexBuffer::getVertexOffset ( GA_Size  idx,
GA_Offset  pt = GA_INVALID_OFFSET 
)

Look up the vertex at the index specified. If the index requested is greater than the allocated number of vertices, new vertices will be allocated. The const method will not append new vertices, and will return GA_INVALID_INDEX if the index is out of range.

GA_Offset GA_WorkVertexBuffer::getVertexOffset ( GA_Size  idx) const

Look up the vertex at the index specified. If the index requested is greater than the allocated number of vertices, new vertices will be allocated. The const method will not append new vertices, and will return GA_INVALID_INDEX if the index is out of range.

GA_VertexPool& GA_WorkVertexBuffer::getVertexPool ( ) const
inline

Definition at line 82 of file GA_WorkVertexBuffer.h.

void GA_WorkVertexBuffer::growBuffer ( GA_Size  newsize)

Grow the buffer to the size specified. Temporary points will be created for each temporary vertex

void GA_WorkVertexBuffer::reserve ( GA_Size  num_elems)

Reserve memory for the given amount of vertices/points without growing the the buffer. Only has an effect when num_elems is larger than the current number of entries.

void GA_WorkVertexBuffer::swapVertices ( GA_Size  i1,
GA_Size  i2 
)
inline

Swap two entries in the vertex array. This changes the vertex order in the buffer, but has no effect on the geometry.

Definition at line 100 of file GA_WorkVertexBuffer.h.


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