In file include/csgeom/polyidx.h:

class csPolyIndexed

The following class represents a general polygon

Public Methods

void AddVertex(int i)
Add a vertex index to the polygon
csPolyIndexed(csPolyIndexed& copy)
Copy constructor.
csPolyIndexed(int start_size = 10)
Make a new empty polygon
int GetNumVertices()
Get the number of vertices
int GetVertex(int i)
Get the specified vertex index
int* GetVertexIndices()
Get the array with all vertex indices
void MakeEmpty()
Initialize the polygon to empty
void MakeRoom(int new_max)
Make room for at least the specified number of vertices
int& operator[] (int i)
Get the specified vertex index
virtual ~csPolyIndexed()
Destructor.

Protected Fields

int max_vertices
int num_vertices
int* vertices_idx
The vertex indices.

Documentation

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.
int* vertices_idx
The vertex indices.

int num_vertices

int max_vertices

csPolyIndexed(int start_size = 10)
Make a new empty polygon

csPolyIndexed(csPolyIndexed& copy)
Copy constructor.

virtual ~csPolyIndexed()
Destructor.

void MakeEmpty()
Initialize the polygon to empty

int GetNumVertices()
Get the number of vertices

int* GetVertexIndices()
Get the array with all vertex indices

int GetVertex(int i)
Get the specified vertex index

int& operator[] (int i)
Get the specified vertex index

void MakeRoom(int new_max)
Make room for at least the specified number of vertices

void AddVertex(int i)
Add a vertex index to the polygon


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de