Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csSingleIndexVertexSet Class Reference

This class can be used to construct objects which use a single index for vertex. More...

#include <mdltool.h>

List of all members.

Public Methods

 csSingleIndexVertexSet (bool ver=true, bool nrm=true, bool col=true, bool tex=true)
 Create a new set. More...

 csSingleIndexVertexSet (csIntArray *Vertices, csIntArray *Normals, csIntArray *Colors, csIntArray *Texels, bool DeleteLists)
 Create a set from existing lists. More...

 ~csSingleIndexVertexSet ()
 Destructor.

int Add (int Vertex, int Normal, int Color, int Texel)
 Add a vertex to the set. More...

void Add (int num, int *Vertices, int *Normal, int *Colors, int *Texels)
 Add several vertices at once.

int GetVertexCount () const
 Return the number of contained vertices.

int GetVertex (int n) const
 Get a vertex index.

int GetNormal (int n) const
 Get a normal index.

int GetColor (int n) const
 Get a color index.

int GetTexel (int n) const
 Get a texel index.


Detailed Description

This class can be used to construct objects which use a single index for vertex.

normal, color and texel lists, from objects that don't.


Constructor & Destructor Documentation

csSingleIndexVertexSet::csSingleIndexVertexSet ( bool ver = true,
bool nrm = true,
bool col = true,
bool tex = true )
 

Create a new set.

You can chosse which lists to use. For example, if you choose not to use a color list then colors will not be used when searching for a vertex, and calls to GetColor() are not allowed.

csSingleIndexVertexSet::csSingleIndexVertexSet ( csIntArray * Vertices,
csIntArray * Normals,
csIntArray * Colors,
csIntArray * Texels,
bool DeleteLists )
 

Create a set from existing lists.

If NULL is passed for a list then that list will not be used. Note that this is different from adding all elements of the given lists because the lists will be kept and modified every time a vertex is added to the set.


Member Function Documentation

int csSingleIndexVertexSet::Add ( int Vertex,
int Normal,
int Color,
int Texel )
 

Add a vertex to the set.

This function accepts the four separate indices and returns the single index. Certain elements are ignored if no lists exist for them (if demanded so at construction of the set).


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000