![]() |
Public API Reference |
#include <polyidx.h>
Public Methods | |
csPolyIndexed (int start_size=10) | |
Make a new empty polygon. More... | |
csPolyIndexed (csPolyIndexed ©) | |
Copy constructor. More... | |
virtual | ~csPolyIndexed () |
Destructor. More... | |
csPolyIndexed & | operator= (const csPolyIndexed &other) |
Assignment operator. More... | |
void | MakeEmpty () |
Initialize the polygon to empty. More... | |
int | GetVertexCount () const |
Get the number of vertices. More... | |
int * | GetVertexIndices () |
Get the array with all vertex indices. More... | |
const int * | GetVertexIndices () const |
Get the array with all vertex indices. More... | |
int | GetVertex (int i) const |
Get the specified vertex index. More... | |
int & | operator[] (int i) |
Get the specified vertex index. More... | |
int & | operator[] (int i) const |
Get the specified vertex index. More... | |
void | MakeRoom (int new_max) |
Make room for at least the specified number of vertices. More... | |
int | AddVertex (int i) |
Add a vertex index to the polygon. More... | |
Protected Attributes | |
int * | vertices_idx |
The vertex indices. More... |
Vertices are indexed relative to some vertex array instead of directly represented in the polygon. Note that this polygon has no knowledge of the actual values of the vertices. It only keeps the indices. So it can actually be used both for 3D and 2D polygons.
Definition at line 35 of file polyidx.h.
|
Make a new empty polygon.
|
|
Copy constructor.
|
|
Destructor.
|
|
Add a vertex index to the polygon. Return index of added index. |
|
Get the specified vertex index.
Definition at line 83 of file polyidx.h. References vertices_idx. |
|
Get the number of vertices.
|
|
Get the array with all vertex indices.
Definition at line 78 of file polyidx.h. References vertices_idx. |
|
Get the array with all vertex indices.
Definition at line 73 of file polyidx.h. References vertices_idx. |
|
Initialize the polygon to empty.
|
|
Make room for at least the specified number of vertices.
|
|
Assignment operator.
|
|
Get the specified vertex index.
Definition at line 101 of file polyidx.h. References vertices_idx. |
|
Get the specified vertex index.
Definition at line 92 of file polyidx.h. References vertices_idx. |
|
The vertex indices.
Definition at line 39 of file polyidx.h. Referenced by GetVertex, GetVertexIndices, and operator[]. |