Drag[en]gine Game Engine  1.0
deModelLOD Class Reference

Model LOD. Stores a single level of detail mesh for the model. Stores weights, vertices, faces and texture coordinate sets. Bones and textures are shared across all LOD meshes. To remove wasted memory the weights, vertices and faces are stored in flattened arrays. The weights are stored in two different flattened arrays which can not be indexed directly as weight sets have usually different number of weights. All weight sets are stored one after the other in the weights array sorted by the number of weights they contain. Thus first come all weight sets with one bone, then all with two bones and so forth. The second array stores the number of weight sets for each run of weight sets with the same number of bones. This array too starts first with the count for all weight sets with one bone then the count for all weight sets with two bones and so forth. The weight sets are indexed in the sequence they are stored. More...

#include <deModelLOD.h>

Public Member Functions

Constructors and Destructors
 deModelLOD ()
 
 ~deModelLOD ()
 
Weight Sets Management
int GetWeightCount () const
 
void SetWeightCount (int count)
 
deModelWeightGetWeightAt (int index) const
 
deModelWeightGetWeights () const
 
int GetWeightGroupCount () const
 
void SetWeightGroupCount (int count)
 
int GetWeightGroupAt (int index) const
 
void SetWeightGroupAt (int index, int weightSetCount) const
 
int * GetWeightGroups () const
 
Vertex Management
int GetVertexCount () const
 
void SetVertexCount (int count)
 
deModelVertexGetVertexAt (int index) const
 
deModelVertexGetVertices () const
 
Face Management
int GetNormalCount () const
 
void SetNormalCount (int count)
 
int GetTangentCount () const
 
void SetTangentCount (int count)
 
int GetFaceCount () const
 
void SetFaceCount (int count)
 
deModelFaceGetFaceAt (int index) const
 
deModelFaceGetFaces () const
 
Texture Coordinates.
int GetTextureCoordinatesCount () const
 
void SetTextureCoordinatesCount (int count)
 
int GetTextureCoordinatesSetCount () const
 
void SetTextureCoordinatesSetCount (int count)
 
deModelTextureCoordinatesSetGetTextureCoordinatesSetAt (int index) const
 
deModelTextureCoordinatesSetGetTextureCoordinatesSets () const
 

Detailed Description

Model LOD. Stores a single level of detail mesh for the model. Stores weights, vertices, faces and texture coordinate sets. Bones and textures are shared across all LOD meshes. To remove wasted memory the weights, vertices and faces are stored in flattened arrays. The weights are stored in two different flattened arrays which can not be indexed directly as weight sets have usually different number of weights. All weight sets are stored one after the other in the weights array sorted by the number of weights they contain. Thus first come all weight sets with one bone, then all with two bones and so forth. The second array stores the number of weight sets for each run of weight sets with the same number of bones. This array too starts first with the count for all weight sets with one bone then the count for all weight sets with two bones and so forth. The weight sets are indexed in the sequence they are stored.

Author
Pl├╝ss Roland
Version
1.0
Date
2012

Constructor & Destructor Documentation

◆ deModelLOD()

deModelLOD::deModelLOD ( )

Creates a new model lod object.

◆ ~deModelLOD()

deModelLOD::~deModelLOD ( )

Cleans up the model lod object.

Member Function Documentation

◆ GetFaceAt()

deModelFace& deModelLOD::GetFaceAt ( int  index) const

Retrieves the face at the given index.

Referenced by GetFaceCount().

◆ GetFaceCount()

int deModelLOD::GetFaceCount ( ) const
inline

Retrieves the count of faces.

References GetFaceAt(), and SetFaceCount().

◆ GetFaces()

deModelFace* deModelLOD::GetFaces ( ) const
inline

Retrieves the pointer to the faces.

◆ GetNormalCount()

int deModelLOD::GetNormalCount ( ) const
inline

Retrieves the count of normals.

References SetNormalCount().

◆ GetTangentCount()

int deModelLOD::GetTangentCount ( ) const
inline

Retrieves the count of tangents.

References SetTangentCount().

◆ GetTextureCoordinatesCount()

int deModelLOD::GetTextureCoordinatesCount ( ) const
inline

Retrieves the number of texture coordinates per set.

References SetTextureCoordinatesCount().

◆ GetTextureCoordinatesSetAt()

deModelTextureCoordinatesSet& deModelLOD::GetTextureCoordinatesSetAt ( int  index) const

Retrieves the texture coordinates set at the given index.

Referenced by GetTextureCoordinatesSetCount().

◆ GetTextureCoordinatesSetCount()

int deModelLOD::GetTextureCoordinatesSetCount ( ) const
inline

Retrieves the number of texture coordinates sets.

References GetTextureCoordinatesSetAt(), and SetTextureCoordinatesSetCount().

◆ GetTextureCoordinatesSets()

deModelTextureCoordinatesSet* deModelLOD::GetTextureCoordinatesSets ( ) const
inline

Retrieves the pointer to the texture coordinates sets.

◆ GetVertexAt()

deModelVertex& deModelLOD::GetVertexAt ( int  index) const

Retrieves the vertex at the given index.

Referenced by GetVertexCount().

◆ GetVertexCount()

int deModelLOD::GetVertexCount ( ) const
inline

Retrieves the count of vertices.

References GetVertexAt(), and SetVertexCount().

◆ GetVertices()

deModelVertex* deModelLOD::GetVertices ( ) const
inline

Retrieves the pointer to the vertices.

◆ GetWeightAt()

deModelWeight& deModelLOD::GetWeightAt ( int  index) const

Retrieves the weight at the given position.

Referenced by GetWeightCount().

◆ GetWeightCount()

int deModelLOD::GetWeightCount ( ) const
inline

Retrieves the number of weights.

References GetWeightAt(), and SetWeightCount().

◆ GetWeightGroupAt()

int deModelLOD::GetWeightGroupAt ( int  index) const

Retrieves the weight group at the given position.

Referenced by GetWeightGroupCount().

◆ GetWeightGroupCount()

int deModelLOD::GetWeightGroupCount ( ) const
inline

Retrieves the number of weight groups.

References GetWeightGroupAt(), SetWeightGroupAt(), and SetWeightGroupCount().

◆ GetWeightGroups()

int* deModelLOD::GetWeightGroups ( ) const
inline

Retrieves the pointer to the weight groups.

◆ GetWeights()

deModelWeight* deModelLOD::GetWeights ( ) const
inline

Retrieves the pointer to the weights.

◆ SetFaceCount()

void deModelLOD::SetFaceCount ( int  count)

Sets the number of faces.

Referenced by GetFaceCount().

◆ SetNormalCount()

void deModelLOD::SetNormalCount ( int  count)

Sets the count of normals.

Referenced by GetNormalCount().

◆ SetTangentCount()

void deModelLOD::SetTangentCount ( int  count)

Sets the count of tangents.

Referenced by GetTangentCount().

◆ SetTextureCoordinatesCount()

void deModelLOD::SetTextureCoordinatesCount ( int  count)

Sets the number of texture coordinates per set.

Referenced by GetTextureCoordinatesCount().

◆ SetTextureCoordinatesSetCount()

void deModelLOD::SetTextureCoordinatesSetCount ( int  count)

Sets the number of texture coordinates sets which has to be at least 1.

Referenced by GetTextureCoordinatesSetCount().

◆ SetVertexCount()

void deModelLOD::SetVertexCount ( int  count)

Sets the number of vertices.

Referenced by GetVertexCount().

◆ SetWeightCount()

void deModelLOD::SetWeightCount ( int  count)

Sets the number of weights.

Referenced by GetWeightCount().

◆ SetWeightGroupAt()

void deModelLOD::SetWeightGroupAt ( int  index,
int  weightSetCount 
) const

Sets the weight group at the given position.

Referenced by GetWeightGroupCount().

◆ SetWeightGroupCount()

void deModelLOD::SetWeightGroupCount ( int  count)

Sets the number of weight groups.

Referenced by GetWeightGroupCount().


The documentation for this class was generated from the following file: