Drag[en]gine Game Engine  1.0
deSkin Class Reference

Skin with textures. More...

#include <deSkin.h>

Inheritance diagram for deSkin:
deFileResource deResource deObject

Public Member Functions

Texture Management
int GetTextureCount () const
 
void AddTexture (deSkinTexture *tex)
 
deSkinTextureGetTextureAt (int index) const
 
int IndexOfTextureNamed (const char *name) const
 
System Peers
deBaseGraphicSkinGetGraphicSkin () const
 
void SetGraphicSkin (deBaseGraphicSkin *graSkin)
 
deBaseAudioSkinGetAudioSkin () const
 
void SetAudioSkin (deBaseAudioSkin *audSkin)
 
deBasePhysicsSkinGetPhysicsSkin () const
 
void SetPhysicsSkin (deBasePhysicsSkin *phySkin)
 
- 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...
 
bool GetAsynchron () const
 Resource is asynchron. More...
 
void SetAsynchron (bool asynchron)
 Set if resource is asynchron. More...
 
 deFileResource (deResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename)
 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)
 
virtual ~deSkin ()
 Clean up skin. 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.
Author
Pl├╝ss Roland
Version
1.0
Date
2008

Constructor & Destructor Documentation

◆ deSkin()

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

Creates a 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

◆ AddTexture()

void deSkin::AddTexture ( deSkinTexture tex)

Adds the given texture.

Referenced by GetTextureCount().

◆ GetAudioSkin()

deBaseAudioSkin* deSkin::GetAudioSkin ( ) const
inline

Retrieves the audio system peer object.

References SetAudioSkin().

◆ GetGraphicSkin()

deBaseGraphicSkin* deSkin::GetGraphicSkin ( ) const
inline

Retrieves the graphic system peer object.

References SetGraphicSkin().

◆ GetPhysicsSkin()

deBasePhysicsSkin* deSkin::GetPhysicsSkin ( ) const
inline

Retrieves the physics system peer object.

References SetPhysicsSkin().

◆ GetTextureAt()

deSkinTexture* deSkin::GetTextureAt ( int  index) const

Retrieves the texture with the given index.

Referenced by GetTextureCount().

◆ GetTextureCount()

int deSkin::GetTextureCount ( ) const
inline

Retrieves the count of textures.

References AddTexture(), GetTextureAt(), and IndexOfTextureNamed().

◆ IndexOfTextureNamed()

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

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

Referenced by GetTextureCount().

◆ SetAudioSkin()

void deSkin::SetAudioSkin ( deBaseAudioSkin audSkin)

Sets the audio system peer object.

Referenced by GetAudioSkin().

◆ SetGraphicSkin()

void deSkin::SetGraphicSkin ( deBaseGraphicSkin graSkin)

Sets the graphic system peer object.

Referenced by GetGraphicSkin().

◆ SetPhysicsSkin()

void deSkin::SetPhysicsSkin ( deBasePhysicsSkin phySkin)

Sets the physics system peer object.

Referenced by GetPhysicsSkin().


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