Drag[en]gine Game Engine  1.21
deModel Class Reference

Model Resource. More...

#include <deModel.h>

Inheritance diagram for deModel:
deFileResource deResource deObject

Public Types

typedef deTObjectReference< deModelRef
 Type holding strong reference. More...
 
- Public Types inherited from deResource
typedef deTObjectReference< deResourceRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 

Public Member Functions

Management
decStringListGetTextureCoordinatesSetList ()
 List of texture coordinates sets names. More...
 
const decStringListGetTextureCoordinatesSetList () 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...
 
deModelBoneGetBoneAt (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...
 
deModelTextureGetTextureAt (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...
 
deModelLODGetLODAt (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...
 
deModelVertexPositionSetGetVertexPositionSetAt (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
deVirtualFileSystemGetVirtualFileSystem () const
 Virtual file system or NULL if build from memory. More...
 
const decStringGetFilename () 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
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () 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

deBaseGraphicModelGetPeerGraphic () const
 Graphic system peer. More...
 
void SetPeerGraphic (deBaseGraphicModel *peer)
 Set graphic system peer. More...
 
deBaseAudioModelGetPeerAudio () const
 Physics system peer. More...
 
void SetPeerAudio (deBaseAudioModel *peer)
 Set physics system peer. More...
 
deBasePhysicsModelGetPeerPhysics () 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...
 

Detailed Description

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.

Member Typedef Documentation

◆ Ref

Type holding strong reference.

Constructor & Destructor Documentation

◆ deModel()

deModel::deModel ( deModelManager manager,
deVirtualFileSystem vfs,
const char *  filename,
TIME_SYSTEM  modificationTime 
)

Create new model object with the given resource manager and filename.

◆ ~deModel()

virtual deModel::~deModel ( )
protectedvirtual

Clean up model.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ AddBone()

void deModel::AddBone ( deModelBone bone)

Adds a new bone with the given name.

◆ AddLOD()

void deModel::AddLOD ( deModelLOD lod)

Adds a new LOD mesh.

◆ AddTexture()

void deModel::AddTexture ( deModelTexture texture)

Adds a new texture with the given name and size.

◆ AddVertexPositionSet()

void deModel::AddVertexPositionSet ( deModelVertexPositionSet set)

Add vertex position set.

◆ GetBoneAt()

deModelBone* deModel::GetBoneAt ( int  index) const

Bone at the given index.

◆ GetBoneCount()

int deModel::GetBoneCount ( ) const
inline

Count of bones.

◆ GetLODAt()

deModelLOD* deModel::GetLODAt ( int  index) const

LOD mesh at the given index.

◆ GetLODCount()

int deModel::GetLODCount ( ) const
inline

Count of LOD meshes.

◆ GetPeerAudio()

deBaseAudioModel* deModel::GetPeerAudio ( ) const
inline

Physics system peer.

◆ GetPeerGraphic()

deBaseGraphicModel* deModel::GetPeerGraphic ( ) const
inline

Graphic system peer.

◆ GetPeerPhysics()

deBasePhysicsModel* deModel::GetPeerPhysics ( ) const
inline

Physics system peer.

◆ GetTextureAt()

deModelTexture* deModel::GetTextureAt ( int  index) const

Texture at the given index.

◆ GetTextureCoordinatesSetList() [1/2]

decStringList& deModel::GetTextureCoordinatesSetList ( )
inline

List of texture coordinates sets names.

◆ GetTextureCoordinatesSetList() [2/2]

const decStringList& deModel::GetTextureCoordinatesSetList ( ) const
inline

◆ GetTextureCount()

int deModel::GetTextureCount ( ) const
inline

Count of textures.

◆ GetVertexPositionSetAt()

deModelVertexPositionSet* deModel::GetVertexPositionSetAt ( int  index) const

Vertex position set at index.

◆ GetVertexPositionSetCount()

int deModel::GetVertexPositionSetCount ( ) const
inline

Count of vertex position sets.

◆ HasBoneNamed()

bool deModel::HasBoneNamed ( const char *  name) const

Determiens if a bone with the given name exists.

◆ HasTextureNamed()

bool deModel::HasTextureNamed ( const char *  name) const

Determiens if a texture with the given name exists.

◆ HasVertexPositionSetNamed()

bool deModel::HasVertexPositionSetNamed ( const char *  name) const

Named vertex position set is present.

◆ IndexOfBoneNamed()

int deModel::IndexOfBoneNamed ( const char *  name) const

Index of the bone with the given name or -1 if not found.

◆ IndexOfTextureNamed()

int deModel::IndexOfTextureNamed ( const char *  name) const

Index of the texture with the given name or -1 if not found.

◆ IndexOfVertexPositionSetNamed()

int deModel::IndexOfVertexPositionSetNamed ( const char *  name) const

Index of named vertex position set with name or -1 if absent.

◆ Prepare()

void deModel::Prepare ( )

Prepare model for later use.

◆ SetPeerAudio()

void deModel::SetPeerAudio ( deBaseAudioModel peer)

Set physics system peer.

◆ SetPeerGraphic()

void deModel::SetPeerGraphic ( deBaseGraphicModel peer)

Set graphic system peer.

◆ SetPeerPhysics()

void deModel::SetPeerPhysics ( deBasePhysicsModel peer)

Set physics system peer.

◆ Verify()

bool deModel::Verify ( )

Verifies that the data in the model are valid.


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