CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

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.

 csSingleIndexVertexSet (csDirtyAccessArray< int > *Vertices, csDirtyAccessArray< int > *Normals, csDirtyAccessArray< int > *Colors, csDirtyAccessArray< int > *Texels, bool DeleteLists)
 Create a set from existing lists.

 ~csSingleIndexVertexSet ()
 Destructor.

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

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.

Definition at line 41 of file mdltool.h.


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 csDirtyAccessArray< int > *    Vertices,
csDirtyAccessArray< int > *    Normals,
csDirtyAccessArray< int > *    Colors,
csDirtyAccessArray< int > *    Texels,
bool    DeleteLists
 

Create a set from existing lists.

If 0 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.

csSingleIndexVertexSet::~csSingleIndexVertexSet  
 

Destructor.


Member Function Documentation

void csSingleIndexVertexSet::Add int    num,
int *    Vertices,
int *    Normal,
int *    Colors,
int *    Texels
 

Add several vertices at once.

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).

int csSingleIndexVertexSet::GetColor int    n const
 

Get a color index.

int csSingleIndexVertexSet::GetNormal int    n const
 

Get a normal index.

int csSingleIndexVertexSet::GetTexel int    n const
 

Get a texel index.

int csSingleIndexVertexSet::GetVertex int    n const
 

Get a vertex index.

int csSingleIndexVertexSet::GetVertexCount  
 

Return the number of contained vertices.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18