Model Resource. More...
#include <deModel.h>
Public Member Functions | |
Constructors and Destructors | |
| deModel (deModelManager *manager, const char *filename) | |
| Creates a new model object with the given resource manager and filename. | |
| virtual | ~deModel () |
| Cleans up the model. | |
Management | |
| const decVector & | GetMinimumExtend () const |
| Retrieves the minimum extends. | |
| const decVector & | GetMaximumExtend () const |
| Retrieves the maximum extends. | |
Loading | |
| bool | Verify () |
| Verifies that the data in the model are valid. | |
| void | Prepare () |
| Prepare model for later use. | |
Bone Management | |
| int | GetBoneCount () const |
| Retrieves the count of bones. | |
| deModelBone * | GetBoneAt (int index) const |
| Retrieves the bone at the given index. | |
| int | IndexOfBoneNamed (const char *name) const |
| Retrieves the index of the bone with the given name or -1 if not found. | |
| bool | HasBoneNamed (const char *name) const |
| Determiens if a bone with the given name exists. | |
| void | AddBone (deModelBone *bone) |
| Adds a new bone with the given name. | |
Texture Management | |
| int | GetTextureCount () const |
| Retrieves the count of textures. | |
| deModelTexture * | GetTextureAt (int index) const |
| Retrieves the texture at the given index. | |
| int | IndexOfTextureNamed (const char *name) const |
| Retrieves the index of the texture with the given name or -1 if not found. | |
| bool | HasTextureNamed (const char *name) const |
| Determiens if a texture with the given name exists. | |
| void | AddTexture (deModelTexture *texture) |
| Adds a new texture with the given name and size. | |
Weights Management | |
| int | GetWeightsCount () const |
| Retrieves the count of weights. | |
| deModelWeights * | GetWeightsAt (int index) const |
| Retrieves the weight at the given index. | |
| void | AddWeights (deModelWeights *weights) |
| Adds the given weight. | |
| int | FindEqualWeights (deModelWeights *weights) const |
| Retrieves the index of the weight which is equal to the given weight or -1 if not found. | |
Vertex Management | |
| int | GetVertexCount () const |
| Retrieves the count of vertices. | |
| deModelVertex * | GetVertexAt (int index) const |
| Retrieves the vertex at the given index. | |
| void | AddVertex (deModelVertex *vertex) |
| Adds a new vertex. | |
Face Management | |
| int | GetFaceCount () const |
| Retrieves the count of faces. | |
| deModelFace * | GetFaceAt (int index) const |
| Retrieves the face at the given index. | |
| void | AddFace (deModelFace *face) |
| Adds a new face. | |
Normal Management | |
| int | GetNormalCount () const |
| Retrieves the count of normals. | |
| const decVector & | GetNormalAt (int index) const |
| Retrieves the normal at the given index. | |
| void | SetNormalCount (int count) |
| Sets the count of normals. | |
Tangent Management | |
| int | GetTangentCount () const |
| Retrieves the count of tangents. | |
| const decVector & | GetTangentAt (int index) const |
| Retrieves the tangent at the given index. | |
| void | SetTangentCount (int count) |
| Sets the count of tangents. | |
Texture Coordinates Sets. | |
| int | GetTexCoordSetCount () const |
| Retrieves the number of texture coordinates sets. | |
| deModelTextureCoordinatesSet * | GetTexCoordSetAt (int index) const |
| Retrieves the texture coordinates set at the given index. | |
| deModelTextureCoordinatesSet * | GetTexCoordSetNamed (const char *name) const |
| Retrieves the texture coordinates set with the given name or NULL if not found. | |
| bool | HasTexCoordSetNamed (const char *name) const |
| Determiens if a texture coordinates set with the given name exists. | |
| int | IndexOfTexCoordSetNamed (const char *name) const |
| Retrieves the index of the texture coordinates set with the given name or -1 if not found. | |
| void | AddTexCoordSet (deModelTextureCoordinatesSet *texCoordSet) |
| Adds a new texture coordinate set. | |
System Peers | |
| deBaseGraphicModel * | GetGraphicModel () const |
| Retrieves the graphic system peer. | |
| void | SetGraphicModel (deBaseGraphicModel *peer) |
| Sets the graphic system peer. | |
| deBaseAudioModel * | GetAudioModel () const |
| Retrieves the physics system peer. | |
| void | SetAudioModel (deBaseAudioModel *peer) |
| Sets the physics system peer. | |
| deBasePhysicsModel * | GetPhysicsModel () const |
| Retrieves the physics system peer. | |
| void | SetPhysicsModel (deBasePhysicsModel *peer) |
| Sets the physics system peer. | |
Model Resource.
Models represent the geometry of a component to render in a scene. A model keeps track of bones, textures, weights, vertices, faces, normals and tangents. Furthermore additional named texture coordinate sets can be defined.
| deModel::deModel | ( | deModelManager * | manager, |
| const char * | filename | ||
| ) |
Creates a new model object with the given resource manager and filename.
| virtual deModel::~deModel | ( | ) | [virtual] |
Cleans up the model.
| void deModel::AddBone | ( | deModelBone * | bone ) |
Adds a new bone with the given name.
| void deModel::AddFace | ( | deModelFace * | face ) |
Adds a new face.
| void deModel::AddTexCoordSet | ( | deModelTextureCoordinatesSet * | texCoordSet ) |
Adds a new texture coordinate set.
| void deModel::AddTexture | ( | deModelTexture * | texture ) |
Adds a new texture with the given name and size.
| void deModel::AddVertex | ( | deModelVertex * | vertex ) |
Adds a new vertex.
| void deModel::AddWeights | ( | deModelWeights * | weights ) |
Adds the given weight.
| int deModel::FindEqualWeights | ( | deModelWeights * | weights ) | const |
Retrieves the index of the weight which is equal to the given weight or -1 if not found.
| deBaseAudioModel* deModel::GetAudioModel | ( | ) | const [inline] |
Retrieves the physics system peer.
| deModelBone* deModel::GetBoneAt | ( | int | index ) | const |
Retrieves the bone at the given index.
| int deModel::GetBoneCount | ( | ) | const [inline] |
Retrieves the count of bones.
| deModelFace* deModel::GetFaceAt | ( | int | index ) | const |
Retrieves the face at the given index.
| int deModel::GetFaceCount | ( | ) | const [inline] |
Retrieves the count of faces.
| deBaseGraphicModel* deModel::GetGraphicModel | ( | ) | const [inline] |
Retrieves the graphic system peer.
| const decVector& deModel::GetMaximumExtend | ( | ) | const [inline] |
Retrieves the maximum extends.
| const decVector& deModel::GetMinimumExtend | ( | ) | const [inline] |
Retrieves the minimum extends.
| const decVector& deModel::GetNormalAt | ( | int | index ) | const |
Retrieves the normal at the given index.
| int deModel::GetNormalCount | ( | ) | const [inline] |
Retrieves the count of normals.
| deBasePhysicsModel* deModel::GetPhysicsModel | ( | ) | const [inline] |
Retrieves the physics system peer.
| const decVector& deModel::GetTangentAt | ( | int | index ) | const |
Retrieves the tangent at the given index.
| int deModel::GetTangentCount | ( | ) | const [inline] |
Retrieves the count of tangents.
| deModelTextureCoordinatesSet* deModel::GetTexCoordSetAt | ( | int | index ) | const |
Retrieves the texture coordinates set at the given index.
| int deModel::GetTexCoordSetCount | ( | ) | const [inline] |
Retrieves the number of texture coordinates sets.
| deModelTextureCoordinatesSet* deModel::GetTexCoordSetNamed | ( | const char * | name ) | const |
Retrieves the texture coordinates set with the given name or NULL if not found.
| deModelTexture* deModel::GetTextureAt | ( | int | index ) | const |
Retrieves the texture at the given index.
| int deModel::GetTextureCount | ( | ) | const [inline] |
Retrieves the count of textures.
| deModelVertex* deModel::GetVertexAt | ( | int | index ) | const |
Retrieves the vertex at the given index.
| int deModel::GetVertexCount | ( | ) | const [inline] |
Retrieves the count of vertices.
| deModelWeights* deModel::GetWeightsAt | ( | int | index ) | const |
Retrieves the weight at the given index.
| int deModel::GetWeightsCount | ( | ) | const [inline] |
Retrieves the count of weights.
| bool deModel::HasBoneNamed | ( | const char * | name ) | const |
Determiens if a bone with the given name exists.
| bool deModel::HasTexCoordSetNamed | ( | const char * | name ) | const |
Determiens if a texture coordinates set with the given name exists.
| bool deModel::HasTextureNamed | ( | const char * | name ) | const |
Determiens if a texture with the given name exists.
| int deModel::IndexOfBoneNamed | ( | const char * | name ) | const |
Retrieves the index of the bone with the given name or -1 if not found.
| int deModel::IndexOfTexCoordSetNamed | ( | const char * | name ) | const |
Retrieves the index of the texture coordinates set with the given name or -1 if not found.
| int deModel::IndexOfTextureNamed | ( | const char * | name ) | const |
Retrieves the index of the texture with the given name or -1 if not found.
| void deModel::Prepare | ( | ) |
Prepare model for later use.
| void deModel::SetAudioModel | ( | deBaseAudioModel * | peer ) |
Sets the physics system peer.
| void deModel::SetGraphicModel | ( | deBaseGraphicModel * | peer ) |
Sets the graphic system peer.
| void deModel::SetNormalCount | ( | int | count ) |
Sets the count of normals.
| void deModel::SetPhysicsModel | ( | deBasePhysicsModel * | peer ) |
Sets the physics system peer.
| void deModel::SetTangentCount | ( | int | count ) |
Sets the count of tangents.
| bool deModel::Verify | ( | ) |
Verifies that the data in the model are valid.
1.7.2