11 #ifndef __GA_VertexPool__
12 #define __GA_VertexPool__
18 #define GA_VERTEX_POOL_SIZE 32
22 #if defined(GA_STRICT_TYPES)
24 class GA_VertexPoolIndexTag {};
47 friend class ga_VertexPoolProxy;
53 bool isBound()
const {
return myDetail != 0; }
67 return myCopiedDetail;
73 return myVertices(index);
77 return myPoints(index);
92 void rewireVertexPoint(GA_VertexPoolIndex
index,
99 for (
GA_Size i = 0; i < nvertex; ++i)
100 buffer[i] = appendVertex();
105 GA_VertexPoolIndex appendPoint();
111 for (
GA_Size i = 0; i < nvertex; ++i)
112 buffer[i] = appendPoint();
118 void freeVertex(GA_VertexPoolIndex
index);
123 for (
GA_Size i = 0; i < nvertex; ++i)
129 void freePoint(GA_VertexPoolIndex
index);
134 for (
GA_Size i = 0; i < nvertex; ++i)
void freeVertices(const GA_VertexPoolIndex *list, GA_Size nvertex)
Free a list of vertices.
void freePoints(const GA_VertexPoolIndex *list, GA_Size nvertex)
Free a list of points. Vertices should be free'd before points.
void appendPoints(GA_VertexPoolIndex *buffer, GA_Size nvertex)
Manages allocation/deletion of temporary vertex/points for a detail.
GA_Size GA_VertexPoolIndex
GA_Offset getVertex(GA_VertexPoolIndex index) const
Look up the GA_Offset at the given index.
exint GA_Size
Defines the bit width for index and offset types in GA.
#define GA_INVALID_OFFSET
GA_Size entries() const
Number of vertices in the vertex pool.
const GA_Offset * array() const
#define SYS_DECLARE_IS_POD(T)
Declare a type as POD.
A handle to simplify manipulation of multiple attributes.
bool isDetailCopied() const
auto reserve(std::back_insert_iterator< Container > it, size_t n) -> checked_ptr< typename Container::value_type >
Container class for all geometry.
void appendVertices(GA_VertexPoolIndex *buffer, GA_Size nvertex)
GA_Offset getPoint(GA_VertexPoolIndex index) const