CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csShaderVariable Class Reference

Storage class for inheritable variables in the shader system. More...

#include <shadervar.h>

Inheritance diagram for csShaderVariable:

csRefCount List of all members.

Public Types

enum  VariableType
 Data types able to be stored. More...


Public Methods

 csShaderVariable (csStringID name)
 Constructor. More...

VariableType GetType () const
 Get type of data stored. More...

void SetType (VariableType t)
 Set type (calling this after SetValue will cause undefined behaviour). More...

csStringID GetName () const
 Get the name of the variable. More...

bool GetValue (int &value) const
 Retireve an int. More...

bool GetValue (float &value) const
 Retrieve a float. More...

bool GetValue (iString *&value) const
 Retrieve a string. More...

bool GetValue (csRGBpixel &value) const
 Retrieve a color. More...

bool GetValue (iTextureHandle *&value) const
 Retrieve a texture handle. More...

bool GetValue (iTextureWrapper *&value) const
 Retrieve a texture wrapper. More...

bool GetValue (csVector2 &value) const
 Retireve a csVector2. More...

bool GetValue (csVector3 &value) const
 Retrieve a csVector3. More...

bool GetValue (csVector4 &value) const
 Retrieve a csVector4. More...

bool SetValue (int value)
 Store an int. More...

bool SetValue (float value)
 Store a float. More...

bool SetValue (iString *value)
 Store a string. More...

bool SetValue (const csRGBpixel &value)
 Store a color. More...

bool SetValue (iTextureHandle *value)
 Store a texture handle. More...

bool SetValue (iTextureWrapper *value)
 Store a texture wrapper. More...

bool SetValue (const csVector2 &value)
 Store a csVector2. More...

bool SetValue (const csVector3 &value)
 Store a csVector3. More...

bool SetValue (const csVector4 &value)
 Store a csVector4. More...


Detailed Description

Storage class for inheritable variables in the shader system.

Definition at line 36 of file shadervar.h.


Member Enumeration Documentation

enum csShaderVariable::VariableType
 

Data types able to be stored.

Definition at line 40 of file shadervar.h.

Referenced by GetType, and SetType.


Constructor & Destructor Documentation

csShaderVariable::csShaderVariable csStringID    name
 

Constructor.


Member Function Documentation

csStringID csShaderVariable::GetName   const [inline]
 

Get the name of the variable.

Definition at line 73 of file shadervar.h.

References csStringID.

Referenced by csMaterial::AddVariable.

VariableType csShaderVariable::GetType   const [inline]
 

Get type of data stored.

Definition at line 68 of file shadervar.h.

References VariableType.

bool csShaderVariable::GetValue csVector4   value const
 

Retrieve a csVector4.

bool csShaderVariable::GetValue csVector3   value const
 

Retrieve a csVector3.

bool csShaderVariable::GetValue csVector2   value const
 

Retireve a csVector2.

bool csShaderVariable::GetValue iTextureWrapper *&    value const
 

Retrieve a texture wrapper.

bool csShaderVariable::GetValue iTextureHandle *&    value const
 

Retrieve a texture handle.

bool csShaderVariable::GetValue csRGBpixel   value const
 

Retrieve a color.

bool csShaderVariable::GetValue iString *&    value const
 

Retrieve a string.

bool csShaderVariable::GetValue float &    value const
 

Retrieve a float.

bool csShaderVariable::GetValue int &    value const
 

Retireve an int.

void csShaderVariable::SetType VariableType    t [inline]
 

Set type (calling this after SetValue will cause undefined behaviour).

Definition at line 70 of file shadervar.h.

References VariableType.

bool csShaderVariable::SetValue const csVector4   value
 

Store a csVector4.

bool csShaderVariable::SetValue const csVector3   value
 

Store a csVector3.

bool csShaderVariable::SetValue const csVector2   value
 

Store a csVector2.

bool csShaderVariable::SetValue iTextureWrapper   value
 

Store a texture wrapper.

bool csShaderVariable::SetValue iTextureHandle   value
 

Store a texture handle.

bool csShaderVariable::SetValue const csRGBpixel   value
 

Store a color.

bool csShaderVariable::SetValue iString   value
 

Store a string.

bool csShaderVariable::SetValue float    value
 

Store a float.

bool csShaderVariable::SetValue int    value
 

Store an int.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14