Drag[en]gine Game Engine  1.21
deSkin Class Reference

Skin with textures. More...

#include <deSkin.h>

Inheritance diagram for deSkin:
deFileResource deResource deObject

Public Types

typedef deTObjectReference< deSkinRef
 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

Texture Management
int GetTextureCount () const
 Count of textures. More...
 
void AddTexture (deSkinTexture *tex)
 Adds the given texture. More...
 
deSkinTextureGetTextureAt (int index) const
 Texture with the given index. More...
 
int IndexOfTextureNamed (const char *name) const
 Index of the texture with the given name or -1 if not found. More...
 
Mapped Values
int GetMappedCount () const
 Count of mapped values. More...
 
deSkinMappedGetMappedAt (int index) const
 Mapped value at index. More...
 
deSkinMappedGetMappedNamed (const char *name) const
 Named mapped value or nullptr. More...
 
int IndexOfMapped (deSkinMapped *mapped) const
 Index of mapped value or -1 if absent. More...
 
int IndexOfMappedNamed (const char *name) const
 Index of named mapped value or -1 if absent. More...
 
bool HasMapped (deSkinMapped *mapped) const
 Mapped value is present. More...
 
bool HasMappedNamed (const char *name) const
 Named mapped value is present. More...
 
void AddMapped (deSkinMapped *mapped)
 Add mapped value. 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

 deSkin (deSkinManager *manager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime)
 Create new skin object with the given resource manager and filename. More...
 
virtual ~deSkin ()
 Clean up skin. More...
 

System Peers

deBaseGraphicSkinGetPeerGraphic () const
 Graphic system peer object. More...
 
void SetPeerGraphic (deBaseGraphicSkin *peer)
 Set graphic system peer object. More...
 
deBaseAudioSkinGetPeerAudio () const
 Audio system peer object. More...
 
void SetPeerAudio (deBaseAudioSkin *peer)
 Set audio system peer object. More...
 
deBasePhysicsSkinGetPeerPhysics () const
 Physics system peer object. More...
 
void SetPeerPhysics (deBasePhysicsSkin *peer)
 Set physics system peer object. 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

Skin with textures.

Skins contain the textures for scene components. A skin is a collection of textures. Each texture is named and composes of properties. Components link to textures using their name. Properties describe where the data for various types originate from.

Renderables
Renderables are the most powerfull building stones of a texture. Such a renderable can be changed during runtime at any time. What data you place inside such a renderable is up to the developer. To use renderables you reference them using their name from inside your code. Renderables can be shared which is why they are stored outside the data trees.

Member Typedef Documentation

◆ Ref

Type holding strong reference.

Constructor & Destructor Documentation

◆ deSkin()

deSkin::deSkin ( deSkinManager manager,
deVirtualFileSystem vfs,
const char *  filename,
TIME_SYSTEM  modificationTime 
)

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

◆ ~deSkin()

virtual deSkin::~deSkin ( )
protectedvirtual

Clean up skin.

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

◆ AddMapped()

void deSkin::AddMapped ( deSkinMapped mapped)

Add mapped value.

◆ AddTexture()

void deSkin::AddTexture ( deSkinTexture tex)

Adds the given texture.

◆ GetMappedAt()

deSkinMapped* deSkin::GetMappedAt ( int  index) const

Mapped value at index.

◆ GetMappedCount()

int deSkin::GetMappedCount ( ) const

Count of mapped values.

◆ GetMappedNamed()

deSkinMapped* deSkin::GetMappedNamed ( const char *  name) const

Named mapped value or nullptr.

◆ GetPeerAudio()

deBaseAudioSkin* deSkin::GetPeerAudio ( ) const
inline

Audio system peer object.

◆ GetPeerGraphic()

deBaseGraphicSkin* deSkin::GetPeerGraphic ( ) const
inline

Graphic system peer object.

◆ GetPeerPhysics()

deBasePhysicsSkin* deSkin::GetPeerPhysics ( ) const
inline

Physics system peer object.

◆ GetTextureAt()

deSkinTexture* deSkin::GetTextureAt ( int  index) const

Texture with the given index.

◆ GetTextureCount()

int deSkin::GetTextureCount ( ) const
inline

Count of textures.

◆ HasMapped()

bool deSkin::HasMapped ( deSkinMapped mapped) const

Mapped value is present.

◆ HasMappedNamed()

bool deSkin::HasMappedNamed ( const char *  name) const

Named mapped value is present.

◆ IndexOfMapped()

int deSkin::IndexOfMapped ( deSkinMapped mapped) const

Index of mapped value or -1 if absent.

◆ IndexOfMappedNamed()

int deSkin::IndexOfMappedNamed ( const char *  name) const

Index of named mapped value or -1 if absent.

◆ IndexOfTextureNamed()

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

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

◆ SetPeerAudio()

void deSkin::SetPeerAudio ( deBaseAudioSkin peer)

Set audio system peer object.

◆ SetPeerGraphic()

void deSkin::SetPeerGraphic ( deBaseGraphicSkin peer)

Set graphic system peer object.

◆ SetPeerPhysics()

void deSkin::SetPeerPhysics ( deBasePhysicsSkin peer)

Set physics system peer object.


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