Drag[en]gine Game Engine  1.0
deDecal Class Reference

Decal Resource. Decals are rectangular textures splatted on a curved surface like a component. Decals have a slight offset from the hosting surface hence they cover the surface below. The ordering of the decal determines which decal covers others. A decal is defined by projection parameters. The actual projection is carried out by the Graphic Module. A decal is first located in space using a position and orientation. The size determines the width and height of the decal on the projection plane previously defined. The texture coordinates defined the texture coordinates of the corners of the decal starting in the upper left corner going around the decal in clockwise order. The decal is then projected along the view direction on the geometry it is attached to. More...

#include <deDecal.h>

Inheritance diagram for deDecal:
deResource deObject

Public Member Functions

Management
const decVectorGetPosition () const
 
void SetPosition (const decVector &position)
 
const decQuaternionGetOrientation () const
 
void SetOrientation (const decQuaternion &orientation)
 
const decVectorGetSize () const
 
void SetSize (const decVector &size)
 
const decTexMatrix2GetTransform () const
 
void SetTransform (const decTexMatrix2 &matrix)
 
deSkinGetSkin () const
 
void SetSkin (deSkin *skin)
 
int GetTexture () const
 
void SetTexture (int texture)
 
deDynamicSkinGetDynamicSkin () const
 
void SetDynamicSkin (deDynamicSkin *dynamicSkin)
 
bool GetVisible () const
 
void SetVisible (bool visible)
 
Bone States
int GetBoneStateCount () const
 
void SetBoneStateCount (int count)
 
deDecalBoneStateGetBoneStateAt (int index)
 
void SnapshotBoneStatesFrom (deComponent *component)
 
System Peers
deBaseGraphicDecalGetGraphicPeer () const
 
void SetGraphicPeer (deBaseGraphicDecal *peer)
 
deBasePhysicsDecalGetPhysicsPeer () const
 
void SetPhysicsPeer (deBasePhysicsDecal *peer)
 
deBaseAudioDecalGetAudioPeer () const
 
void SetAudioPeer (deBaseAudioDecal *peer)
 
- 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

 deDecal (deDecalManager *manager)
 
virtual ~deDecal ()
 Clean up decal. More...
 

Additional Inherited Members

- 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

Decal Resource. Decals are rectangular textures splatted on a curved surface like a component. Decals have a slight offset from the hosting surface hence they cover the surface below. The ordering of the decal determines which decal covers others. A decal is defined by projection parameters. The actual projection is carried out by the Graphic Module. A decal is first located in space using a position and orientation. The size determines the width and height of the decal on the projection plane previously defined. The texture coordinates defined the texture coordinates of the corners of the decal starting in the upper left corner going around the decal in clockwise order. The decal is then projected along the view direction on the geometry it is attached to.

Author
Pl├╝ss Roland
Version
1.0
Date
2012

Constructor & Destructor Documentation

◆ deDecal()

deDecal::deDecal ( deDecalManager manager)

Creates a new decal.

◆ ~deDecal()

virtual deDecal::~deDecal ( )
protectedvirtual

Clean up decal.

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

◆ GetAudioPeer()

deBaseAudioDecal* deDecal::GetAudioPeer ( ) const
inline

Retrieves the audio system peer.

References SetAudioPeer().

◆ GetBoneStateAt()

deDecalBoneState& deDecal::GetBoneStateAt ( int  index)

Retrieves the bone state at the given index.

Referenced by GetBoneStateCount().

◆ GetBoneStateCount()

int deDecal::GetBoneStateCount ( ) const
inline

Retrieves the number of bone states.

References GetBoneStateAt(), SetBoneStateCount(), and SnapshotBoneStatesFrom().

◆ GetDynamicSkin()

deDynamicSkin* deDecal::GetDynamicSkin ( ) const
inline

Retrieves the dynamic skin or null if not used.

References SetDynamicSkin().

◆ GetGraphicPeer()

deBaseGraphicDecal* deDecal::GetGraphicPeer ( ) const
inline

Retrieves the graphic system peer.

References SetGraphicPeer().

◆ GetOrientation()

const decQuaternion& deDecal::GetOrientation ( ) const
inline

Retrieves the orientation.

References SetOrientation().

◆ GetPhysicsPeer()

deBasePhysicsDecal* deDecal::GetPhysicsPeer ( ) const
inline

Retrieves the physics system peer.

References SetPhysicsPeer().

◆ GetPosition()

const decVector& deDecal::GetPosition ( ) const
inline

Retrieves the position.

References SetPosition().

◆ GetSize()

const decVector& deDecal::GetSize ( ) const
inline

Retrieves the size.

References SetSize().

◆ GetSkin()

deSkin* deDecal::GetSkin ( ) const
inline

Retrieves the skin.

References SetSkin().

◆ GetTexture()

int deDecal::GetTexture ( ) const
inline

Retrieves the texture number in the skin.

References SetTexture().

◆ GetTransform()

const decTexMatrix2& deDecal::GetTransform ( ) const
inline

Retrieves the texture coordinate transformation matrix.

References SetTransform().

◆ GetVisible()

bool deDecal::GetVisible ( ) const
inline

Determines if the decal is visible.

References SetVisible().

◆ SetAudioPeer()

void deDecal::SetAudioPeer ( deBaseAudioDecal peer)

Sets the audio system peer.

Referenced by GetAudioPeer().

◆ SetBoneStateCount()

void deDecal::SetBoneStateCount ( int  count)

Sets the number of bone states.

Referenced by GetBoneStateCount().

◆ SetDynamicSkin()

void deDecal::SetDynamicSkin ( deDynamicSkin dynamicSkin)

Sets the dynamic skin or null if not used.

Referenced by GetDynamicSkin().

◆ SetGraphicPeer()

void deDecal::SetGraphicPeer ( deBaseGraphicDecal peer)

Sets the graphic system peer.

Referenced by GetGraphicPeer().

◆ SetOrientation()

void deDecal::SetOrientation ( const decQuaternion orientation)

Sets the orientation.

Referenced by GetOrientation().

◆ SetPhysicsPeer()

void deDecal::SetPhysicsPeer ( deBasePhysicsDecal peer)

Sets the physics system peer.

Referenced by GetPhysicsPeer().

◆ SetPosition()

void deDecal::SetPosition ( const decVector position)

Sets the position.

Referenced by GetPosition().

◆ SetSize()

void deDecal::SetSize ( const decVector size)

Sets the size.

Referenced by GetSize().

◆ SetSkin()

void deDecal::SetSkin ( deSkin skin)

Sets the skin.

Referenced by GetSkin().

◆ SetTexture()

void deDecal::SetTexture ( int  texture)

Sets the texture number in the skin.

Referenced by GetTexture().

◆ SetTransform()

void deDecal::SetTransform ( const decTexMatrix2 matrix)

Sets the texture coordinate transformation matrix.

Referenced by GetTransform().

◆ SetVisible()

void deDecal::SetVisible ( bool  visible)

Sets if the decal is visible.

Referenced by GetVisible().

◆ SnapshotBoneStatesFrom()

void deDecal::SnapshotBoneStatesFrom ( deComponent component)

Copies the current bone state from the provided component.

Referenced by GetBoneStateCount().


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