csPolyIndexed Class Reference
[Geometry utilities]
The following class represents a general polygon.
More...
#include <csgeom/polyidx.h>
Public Member Functions | |
csPolyIndexed (int start_size=10) | |
Make a new empty polygon. | |
csPolyIndexed (csPolyIndexed ©) | |
Copy constructor. | |
virtual | ~csPolyIndexed () |
Destructor. | |
csPolyIndexed & | operator= (const csPolyIndexed &other) |
Assignment operator. | |
void | MakeEmpty () |
Initialize the polygon to empty. | |
int | GetVertexCount () const |
Get the number of vertices. | |
int * | GetVertexIndices () |
Get the array with all vertex indices. | |
const int * | GetVertexIndices () const |
Get the array with all vertex indices. | |
int | GetVertex (int i) const |
Get the specified vertex index. | |
int & | operator[] (int i) |
Get the specified vertex index. | |
int & | operator[] (int i) const |
Get the specified vertex index. | |
void | MakeRoom (int new_max) |
Make room for at least the specified number of vertices. | |
int | AddVertex (int i) |
Add a vertex index to the polygon. | |
Protected Attributes | |
int * | vertices_idx |
The vertex indices. |
Detailed Description
The following class represents a general polygon.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 37 of file polyidx.h.
Constructor & Destructor Documentation
|
Make a new empty polygon.
|
|
Copy constructor.
|
|
Destructor.
|
Member Function Documentation
|
Add a vertex index to the polygon. Return index of added index. |
|
Get the specified vertex index.
Definition at line 85 of file polyidx.h. References vertices_idx. |
|
Get the number of vertices.
|
|
Get the array with all vertex indices.
|
|
Get the array with all vertex indices.
|
|
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 103 of file polyidx.h. References vertices_idx. |
|
Get the specified vertex index.
Definition at line 94 of file polyidx.h. References vertices_idx. |
Member Data Documentation
|
The vertex indices.
Definition at line 41 of file polyidx.h. Referenced by GetVertex(), and operator[](). |
The documentation for this class was generated from the following file:
- csgeom/polyidx.h
Generated for Crystal Space by doxygen 1.3.9.1