Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

sp::video::TextureLayer Class Reference
[Texture Mapping]

#include <spTextureLayer.hpp>

Inheritance diagram for sp::video::TextureLayer:
sp::video::TextureLayerRelief sp::video::TextureLayerStandard

List of all members.

Public Member Functions

 TextureLayer ()
virtual ~TextureLayer ()
virtual void bind () const
virtual void unbind () const
virtual void setupDefault () const
virtual bool active () const
virtual bool sortCompare (const TextureLayer *Other) const
virtual bool compare (const TextureLayer *Other) const
void setTexture (Texture *Tex)
 Sets the texture object. This may also be null.
ETextureLayerTypes getType () const
TexturegetTexture () const
 Returns the texture object. By default null.
void setIndex (u8 LayerIndex)
u8 getIndex () const
 Returns the layer index.
void setEnable (bool Enable)
bool getEnable () const
 Returns true if the texture layer is enabled. By default true.
void setVisibleMask (s32 Mask)
s32 getVisibleMask () const

Static Public Member Functions

static void setDefaultLayerType (const ETextureLayerTypes Type)
static ETextureLayerTypes getDefaultLayerType ()
 Returns the default texture layer type. The initial default type is TEXLAYER_STANDARD.

Protected Member Functions

 TextureLayer (const ETextureLayerTypes Type)

Protected Attributes

ETextureLayerTypes Type_
TextureTexture_
u8 LayerIndex_
bool Enabled_
s32 VisibleMask_
 Visibility bit mask.

Static Protected Attributes

static ETextureLayerTypes DefaultLayerType_ = TEXLAYER_STANDARD

Detailed Description

Base texture layer class. Can also be used as stand alone.

Since:
Version 3.2

Constructor & Destructor Documentation

sp::video::TextureLayer::TextureLayer (  ) 
sp::video::TextureLayer::~TextureLayer (  )  [virtual]
sp::video::TextureLayer::TextureLayer ( const ETextureLayerTypes  Type  )  [protected]

Member Function Documentation

bool sp::video::TextureLayer::active (  )  const [virtual]

Returns true if this texture layer is active. That depends on whether a valid texture object has been set, the layer is enabled and the rule mask matches the global render-system rule mask for texture mapping.

See also:
setTexture
setEnable
setRuleMask
void sp::video::TextureLayer::bind (  )  const [virtual]
bool sp::video::TextureLayer::compare ( const TextureLayer Other  )  const [virtual]

Compares this texture layer with the other one. This should not be used for sorting texture layers.

Parameters:
[in] Other Pointer to the other texture layer object.
Returns:
True if the other layer is logical equal to this layer.
See also:
sortCompare

Reimplemented in sp::video::TextureLayerStandard.

ETextureLayerTypes sp::video::TextureLayer::getDefaultLayerType (  )  [static]

Returns the default texture layer type. The initial default type is TEXLAYER_STANDARD.

bool sp::video::TextureLayer::getEnable (  )  const [inline]

Returns true if the texture layer is enabled. By default true.

u8 sp::video::TextureLayer::getIndex (  )  const [inline]

Returns the layer index.

Texture* sp::video::TextureLayer::getTexture (  )  const [inline]

Returns the texture object. By default null.

ETextureLayerTypes sp::video::TextureLayer::getType (  )  const [inline]
s32 sp::video::TextureLayer::getVisibleMask (  )  const [inline]

Returns the default rule mask. For more information about this take a look at the "setRuleMask" function. The default value is 0xFFFFFFFF.

See also:
setRuleMask
void sp::video::TextureLayer::setDefaultLayerType ( const ETextureLayerTypes  Type  )  [static]

Sets the default layer type. The initial default type is TEXLAYER_STANDARD.

Parameters:
[in] Type Specifies the layer type which is to be set as the default one. This may only be TEXLAYER_BASE, TEXLAYER_STANDARD or TEXLAYER_RELIEF. This value will be used by the MeshBuffer::addTexture and Mesh::addTexture function, when the default texture layer class is selected.
Note:
If you don't need the extra options in the standard texture layer, use the base texture layer as the default one, to increase rendering performance.
See also:
getDefaultLayerType
ETextureLayerTypes
MeshBuffer::addTexture
void sp::video::TextureLayer::setEnable ( bool  Enable  )  [inline]

Enables or disables the texture layer. This can also be done dynamically with the rule mask.

See also:
setRuleMask
void sp::video::TextureLayer::setIndex ( u8  LayerIndex  )  [inline]

Sets the layer index.

Note:
The layer index should be unique within a mesh buffer. Remember that whenever you change the layer index using this function.
void sp::video::TextureLayer::setTexture ( Texture Tex  ) 

Sets the texture object. This may also be null.

void sp::video::TextureLayer::setupDefault (  )  const [virtual]

Sets up the default settings for this layer type. This is used to increase performance by only deactivating texture-layer settings when another layer is activated with a different type of the previous one.

Reimplemented in sp::video::TextureLayerStandard.

void sp::video::TextureLayer::setVisibleMask ( s32  Mask  )  [inline]

Sets the visibility mask. This can be used to hide bunches of texture layers quickly, e.g. when shaders are disabled for debugging purposes. The default bit mask is 0xFFFFFFFF.

See also:
ETexLayerVisibleFlags
bool sp::video::TextureLayer::sortCompare ( const TextureLayer Other  )  const [virtual]

Compares this texture layer with the other one. This is used for sorting texture layers.

Parameters:
[in] Other Pointer to the other texture layer object.
See also:
compare

Reimplemented in sp::video::TextureLayerStandard.

void sp::video::TextureLayer::unbind (  )  const [virtual]

Member Data Documentation

ETextureLayerTypes sp::video::TextureLayer::DefaultLayerType_ = TEXLAYER_STANDARD [static, protected]

Visibility bit mask.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines