Drag[en]gine Game Engine
1.21
|
Model Resource. More...
#include <deModel.h>
Public Types | |
typedef deTObjectReference< deModel > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deResource | |
typedef deTObjectReference< deResource > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deObject | |
typedef deTObjectReference< deObject > | Ref |
Type holding strong reference. More... | |
Public Member Functions | |
Management | |
decStringList & | GetTextureCoordinatesSetList () |
List of texture coordinates sets names. More... | |
const decStringList & | GetTextureCoordinatesSetList () const |
Loading | |
bool | Verify () |
Verifies that the data in the model are valid. More... | |
void | Prepare () |
Prepare model for later use. More... | |
Bone Management | |
int | GetBoneCount () const |
Count of bones. More... | |
deModelBone * | GetBoneAt (int index) const |
Bone at the given index. More... | |
int | IndexOfBoneNamed (const char *name) const |
Index of the bone with the given name or -1 if not found. More... | |
bool | HasBoneNamed (const char *name) const |
Determiens if a bone with the given name exists. More... | |
void | AddBone (deModelBone *bone) |
Adds a new bone with the given name. More... | |
Texture Management | |
int | GetTextureCount () const |
Count of textures. More... | |
deModelTexture * | GetTextureAt (int index) const |
Texture at the given index. More... | |
int | IndexOfTextureNamed (const char *name) const |
Index of the texture with the given name or -1 if not found. More... | |
bool | HasTextureNamed (const char *name) const |
Determiens if a texture with the given name exists. More... | |
void | AddTexture (deModelTexture *texture) |
Adds a new texture with the given name and size. More... | |
LOD Management | |
int | GetLODCount () const |
Count of LOD meshes. More... | |
deModelLOD * | GetLODAt (int index) const |
LOD mesh at the given index. More... | |
void | AddLOD (deModelLOD *lod) |
Adds a new LOD mesh. More... | |
Vertex position set management | |
int | GetVertexPositionSetCount () const |
Count of vertex position sets. More... | |
deModelVertexPositionSet * | GetVertexPositionSetAt (int index) const |
Vertex position set at index. More... | |
int | IndexOfVertexPositionSetNamed (const char *name) const |
Index of named vertex position set with name or -1 if absent. More... | |
bool | HasVertexPositionSetNamed (const char *name) const |
Named vertex position set is present. More... | |
void | AddVertexPositionSet (deModelVertexPositionSet *set) |
Add vertex position set. More... | |
Public Member Functions inherited from deFileResource | |
deVirtualFileSystem * | GetVirtualFileSystem () const |
Virtual file system or NULL if build from memory. More... | |
const decString & | GetFilename () const |
Filename or empty string if build from memory. More... | |
TIME_SYSTEM | GetModificationTime () const |
Modification time used to detect resources changing on disk while loaded. More... | |
void | SetModificationTime (TIME_SYSTEM modificationTime) |
Set modification time used to detect resources changing on disk while loaded. More... | |
bool | GetAsynchron () const |
Resource is asynchron. More... | |
void | SetAsynchron (bool asynchron) |
Set if resource is asynchron. More... | |
bool | GetOutdated () const |
void | MarkOutdated () |
deFileResource (deFileResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime) | |
Create file resource. More... | |
Public Member Functions inherited from deResource | |
deResourceManager * | GetResourceManager () const |
Resource manager or NULL if resource is leaking. More... | |
deEngine * | GetEngine () const |
Game engine object from resource manager. More... | |
deResource * | GetLLManagerPrev () const |
Previous resource in the resource manager linked list. More... | |
void | SetLLManagerPrev (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
deResource * | GetLLManagerNext () const |
Next resource in the resource manager linked list. More... | |
void | SetLLManagerNext (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
void | MarkLeaking () |
Marks the resource leaking. More... | |
deResource (deResourceManager *resourceManager) | |
Create resource. More... | |
Public Member Functions inherited from deObject | |
int | GetRefCount () const |
Reference count. More... | |
void | AddReference () |
Add reference increasing reference count by 1. More... | |
void | FreeReference () |
Decrease reference count by one and delete object if count reaches 0. More... | |
deObject () | |
Create object with reference count of 1. More... | |
Constructors and Destructors | |
deModel (deModelManager *manager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime) | |
Create new model object with the given resource manager and filename. More... | |
virtual | ~deModel () |
Clean up model. More... | |
System Peers | |
deBaseGraphicModel * | GetPeerGraphic () const |
Graphic system peer. More... | |
void | SetPeerGraphic (deBaseGraphicModel *peer) |
Set graphic system peer. More... | |
deBaseAudioModel * | GetPeerAudio () const |
Physics system peer. More... | |
void | SetPeerAudio (deBaseAudioModel *peer) |
Set physics system peer. More... | |
deBasePhysicsModel * | GetPeerPhysics () const |
Physics system peer. More... | |
void | SetPeerPhysics (deBasePhysicsModel *peer) |
Set physics system peer. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from deFileResource | |
virtual | ~deFileResource () |
Clean up file resource. More... | |
Protected Member Functions inherited from deResource | |
virtual | ~deResource () |
Clean up resource. More... | |
Protected Member Functions inherited from deObject | |
virtual | ~deObject () |
Clean up object. More... | |
Model Resource.
Triangle mesh representing visual geometry of a Component in a scene. Contains various information to support texturing, animation, level-of-detail and physics.
typedef deTObjectReference<deModel> deModel::Ref |
Type holding strong reference.
deModel::deModel | ( | deModelManager * | manager, |
deVirtualFileSystem * | vfs, | ||
const char * | filename, | ||
TIME_SYSTEM | modificationTime | ||
) |
Create new model object with the given resource manager and filename.
|
protectedvirtual |
Clean up model.
void deModel::AddBone | ( | deModelBone * | bone | ) |
Adds a new bone with the given name.
void deModel::AddLOD | ( | deModelLOD * | lod | ) |
Adds a new LOD mesh.
void deModel::AddTexture | ( | deModelTexture * | texture | ) |
Adds a new texture with the given name and size.
void deModel::AddVertexPositionSet | ( | deModelVertexPositionSet * | set | ) |
Add vertex position set.
deModelBone* deModel::GetBoneAt | ( | int | index | ) | const |
Bone at the given index.
|
inline |
Count of bones.
deModelLOD* deModel::GetLODAt | ( | int | index | ) | const |
LOD mesh at the given index.
|
inline |
Count of LOD meshes.
|
inline |
Physics system peer.
|
inline |
Graphic system peer.
|
inline |
Physics system peer.
deModelTexture* deModel::GetTextureAt | ( | int | index | ) | const |
Texture at the given index.
|
inline |
List of texture coordinates sets names.
|
inline |
|
inline |
Count of textures.
deModelVertexPositionSet* deModel::GetVertexPositionSetAt | ( | int | index | ) | const |
Vertex position set at index.
|
inline |
Count of vertex position sets.
bool deModel::HasBoneNamed | ( | const char * | name | ) | const |
Determiens if a bone with the given name exists.
bool deModel::HasTextureNamed | ( | const char * | name | ) | const |
Determiens if a texture with the given name exists.
bool deModel::HasVertexPositionSetNamed | ( | const char * | name | ) | const |
Named vertex position set is present.
int deModel::IndexOfBoneNamed | ( | const char * | name | ) | const |
Index of the bone with the given name or -1 if not found.
int deModel::IndexOfTextureNamed | ( | const char * | name | ) | const |
Index of the texture with the given name or -1 if not found.
int deModel::IndexOfVertexPositionSetNamed | ( | const char * | name | ) | const |
Index of named vertex position set with name or -1 if absent.
void deModel::Prepare | ( | ) |
Prepare model for later use.
void deModel::SetPeerAudio | ( | deBaseAudioModel * | peer | ) |
Set physics system peer.
void deModel::SetPeerGraphic | ( | deBaseGraphicModel * | peer | ) |
Set graphic system peer.
void deModel::SetPeerPhysics | ( | deBasePhysicsModel * | peer | ) |
Set physics system peer.
bool deModel::Verify | ( | ) |
Verifies that the data in the model are valid.