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

Manages allocation/deletion of temporary vertex/points for a detail. More...

#include <GA_VertexPool.h>

Public Member Functions

bool isBound () const
 
GA_DetailgetDetail ()
 
bool isDetailCopied () const
 
GA_Offset getVertex (GA_VertexPoolIndex index) const
 Look up the GA_Offset at the given index. More...
 
GA_Offset getPoint (GA_VertexPoolIndex index) const
 
GA_Size entries () const
 Number of vertices in the vertex pool. More...
 
void reserve (GA_Size num_elems)
 
GA_VertexPoolIndex appendVertex (GA_Offset pt=GA_INVALID_OFFSET)
 
void rewireVertexPoint (GA_VertexPoolIndex index, GA_Offset point)
 Rewire a single vertex to a new point link. More...
 
void appendVertices (GA_VertexPoolIndex *buffer, GA_Size nvertex)
 
GA_VertexPoolIndex appendPoint ()
 
void appendPoints (GA_VertexPoolIndex *buffer, GA_Size nvertex)
 
void freeVertex (GA_VertexPoolIndex index)
 
void freeVertices (const GA_VertexPoolIndex *list, GA_Size nvertex)
 Free a list of vertices. More...
 
void freePoint (GA_VertexPoolIndex index)
 
void freePoints (const GA_VertexPoolIndex *list, GA_Size nvertex)
 Free a list of points. Vertices should be free'd before points. More...
 
const GA_Offsetarray () const
 
GA_Offsetarray ()
 

Friends

class GA_AttributeRefMap
 
class ga_VertexPoolProxy
 
class GEO_AttributeHandleList
 

Detailed Description

Manages allocation/deletion of temporary vertex/points for a detail.

This class stores a list of temporary points and vertices for a detail. The class is used by GA_WorkVertexBuffer and is referenced by handle lists.

Definition at line 35 of file GA_VertexPool.h.

Member Function Documentation

GA_VertexPoolIndex GA_VertexPool::appendPoint ( )

Append a single point The method returns the offset in the pool (not the offset in the detail)

void GA_VertexPool::appendPoints ( GA_VertexPoolIndex buffer,
GA_Size  nvertex 
)
inline

Append nvertex vertices to the pool. The offsets are returned in the buffer provided.

Definition at line 109 of file GA_VertexPool.h.

GA_VertexPoolIndex GA_VertexPool::appendVertex ( GA_Offset  pt = GA_INVALID_OFFSET)

Append a single vertex (with an optional point link) The method returns the offset in the pool (not the offset in the detail)

void GA_VertexPool::appendVertices ( GA_VertexPoolIndex buffer,
GA_Size  nvertex 
)
inline

Append nvertex vertices to the pool. The offsets are returned in the buffer provided.

Definition at line 97 of file GA_VertexPool.h.

const GA_Offset* GA_VertexPool::array ( ) const
inline

Definition at line 138 of file GA_VertexPool.h.

GA_Offset* GA_VertexPool::array ( )
inline

Definition at line 139 of file GA_VertexPool.h.

GA_Size GA_VertexPool::entries ( ) const
inline

Number of vertices in the vertex pool.

Definition at line 81 of file GA_VertexPool.h.

void GA_VertexPool::freePoint ( GA_VertexPoolIndex  index)

Free a point. If the index is invalid (i.e. < 0), the free is silently skipped. Vertices should be free'd before points.

void GA_VertexPool::freePoints ( const GA_VertexPoolIndex list,
GA_Size  nvertex 
)
inline

Free a list of points. Vertices should be free'd before points.

Definition at line 132 of file GA_VertexPool.h.

void GA_VertexPool::freeVertex ( GA_VertexPoolIndex  index)

Free a vertex. If the index is invalid (i.e. < 0), the free is silently skipped.

void GA_VertexPool::freeVertices ( const GA_VertexPoolIndex list,
GA_Size  nvertex 
)
inline

Free a list of vertices.

Definition at line 121 of file GA_VertexPool.h.

GA_Detail& GA_VertexPool::getDetail ( )
inline

Return the detail which holds the temporary vertices/points.

Note
This may not be the same as the detail passed into the constructor.

Definition at line 58 of file GA_VertexPool.h.

GA_Offset GA_VertexPool::getPoint ( GA_VertexPoolIndex  index) const
inline

Definition at line 75 of file GA_VertexPool.h.

GA_Offset GA_VertexPool::getVertex ( GA_VertexPoolIndex  index) const
inline

Look up the GA_Offset at the given index.

Definition at line 71 of file GA_VertexPool.h.

bool GA_VertexPool::isBound ( ) const
inline

Return whether this pool is bound to a detail, and hence available for us.

Definition at line 53 of file GA_VertexPool.h.

bool GA_VertexPool::isDetailCopied ( ) const
inline

If the vertex pool was constructed using a const detail, the pool will have made a copy of the detail and this method will return true.

Definition at line 65 of file GA_VertexPool.h.

void GA_VertexPool::reserve ( GA_Size  num_elems)

Reserve memory for the given amount of vertices without changing the number of entries. Only has an effect if num_elems > entries().

void GA_VertexPool::rewireVertexPoint ( GA_VertexPoolIndex  index,
GA_Offset  point 
)

Rewire a single vertex to a new point link.

Friends And Related Function Documentation

friend class GA_AttributeRefMap
friend

Definition at line 46 of file GA_VertexPool.h.

friend class ga_VertexPoolProxy
friend

Definition at line 47 of file GA_VertexPool.h.

friend class GEO_AttributeHandleList
friend

Definition at line 48 of file GA_VertexPool.h.


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