deSkinProperty Class Reference

Skin Texture Property. More...

#include <deSkinProperty.h>

Inheritance diagram for deSkinProperty:
deSkinPropertyColor deSkinPropertyComplex deSkinPropertyImage deSkinPropertyRenderable deSkinPropertyValue

List of all members.

Public Member Functions

Constructors and Destructors
 deSkinProperty (int type)
 Creates a new named skin property with the given type.
virtual ~deSkinProperty ()
 Cleans up the skin property.
Management
int GetType () const
 Retrieves the type number.
const char * GetTexCoordSet () const
 Retrieves the name of the texture coordinate set to use or NULL to use the default one.
void SetTexCoordSet (const char *name)
 Sets the name of the texture coordinate set to use or NULL to use the default one.
Visiting
virtual void Visit (deSkinPropertyVisitor *visitor)
 Visits the property.

Detailed Description

Skin Texture Property.

Defines a property of a skin texture. To allow adding any kind of new material properties without changing the engine code or other modules a simple name based system is used. Depending on the name of a property graphic modules can apply the property to different material properties internally.

A property is defined as mentioned by a name. To avoid storing a
large number of names only a number is used to determine the type of a texture property. To obtain this number add the name of the property to the deTexturePropertyMap object obtainable from the game engine.
Properties can have different types of values depending on their
usage. Simple properties contain a static color or an entire static image. Using a color instead of an image is allowed and equals to an image composing of only this color. The other way is not allowed and results in undefined behavior. The static color and image can be used both either as gray-scale ( in which case only the red component is used ), rgb ( in which case the red, green and blue component are used ) or rgba ( in which case all components are used ). Hence it's possible to define up to four parameters for one property.
There exists a special case and this are renderables. If a property
has a renderable name set its content can be changed dynamically during runtime using renderables in components. This is not considered dynamic since the content is provided by the game script and not produced on the fly.
For dynamic skins there exist the way to specify a source as the
value of a property. Such a sure describes the production process of a dynamic texture. Dynamic skins tend to be slower and consuming more resources than static skins composed of simple properties only. Using a transformation on the texture itself does not make a texture complex and is fast.
Properties can be interprated by one or more modules. So far the
graphic, audio and physics module can use texture properties.
Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

deSkinProperty::deSkinProperty ( int  type )

Creates a new named skin property with the given type.

Parameters:
typeType of the skin property obtained from adding a property name to the texture property map object held by the engine.
virtual deSkinProperty::~deSkinProperty (  ) [virtual]

Cleans up the skin property.


Member Function Documentation

const char* deSkinProperty::GetTexCoordSet (  ) const [inline]

Retrieves the name of the texture coordinate set to use or NULL to use the default one.

int deSkinProperty::GetType (  ) const [inline]

Retrieves the type number.

void deSkinProperty::SetTexCoordSet ( const char *  name )

Sets the name of the texture coordinate set to use or NULL to use the default one.

virtual void deSkinProperty::Visit ( deSkinPropertyVisitor visitor ) [virtual]

Visits the property.

Parameters:
visitorVisitor to use.

Reimplemented in deSkinPropertyColor, deSkinPropertyComplex, deSkinPropertyImage, deSkinPropertyRenderable, and deSkinPropertyValue.


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