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.

VariableType GetType () const
 Get type of data stored.

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

void SetAccessor (iShaderVariableAccessor *a)
 Set an accessor to use when getting the value.

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

bool GetValue (int &value)
 Retireve an int.

bool GetValue (float &value)
 Retrieve a float.

bool GetValue (csRGBpixel &value)
 Retrieve a color.

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

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

bool GetValue (iRenderBuffer *&value)
 Retrieve a iRenderBuffer.

bool GetValue (csVector2 &value)
 Retireve a csVector2.

bool GetValue (csVector3 &value)
 Retrieve a csVector3.

bool GetValue (csVector4 &value)
 Retrieve a csVector4.

bool SetValue (int value)
 Store an int.

bool SetValue (float value)
 Store a float.

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

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

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

bool SetValue (iRenderBuffer *value)
 Store a render buffer.

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

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

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


Detailed Description

Storage class for inheritable variables in the shader system.

Definition at line 57 of file shadervar.h.


Member Enumeration Documentation

enum csShaderVariable::VariableType
 

Data types able to be stored.

Definition at line 61 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 102 of file shadervar.h.

References csStringID.

VariableType csShaderVariable::GetType   const [inline]
 

Get type of data stored.

Definition at line 94 of file shadervar.h.

References VariableType.

bool csShaderVariable::GetValue csVector4   value [inline]
 

Retrieve a csVector4.

Definition at line 172 of file shadervar.h.

bool csShaderVariable::GetValue csVector3   value [inline]
 

Retrieve a csVector3.

Definition at line 164 of file shadervar.h.

References csVector3::Set(), csVector4::x, csVector4::y, and csVector4::z.

bool csShaderVariable::GetValue csVector2   value [inline]
 

Retireve a csVector2.

Definition at line 156 of file shadervar.h.

References csVector2::Set(), csVector4::x, and csVector4::y.

bool csShaderVariable::GetValue iRenderBuffer *&    value [inline]
 

Retrieve a iRenderBuffer.

Definition at line 148 of file shadervar.h.

bool csShaderVariable::GetValue iTextureWrapper *&    value [inline]
 

Retrieve a texture wrapper.

Definition at line 140 of file shadervar.h.

bool csShaderVariable::GetValue iTextureHandle *&    value [inline]
 

Retrieve a texture handle.

Definition at line 132 of file shadervar.h.

bool csShaderVariable::GetValue csRGBpixel   value [inline]
 

Retrieve a color.

Definition at line 121 of file shadervar.h.

References csRGBpixel::alpha, csRGBpixel::blue, csRGBpixel::green, csRGBpixel::red, csVector4::w, csVector4::x, csVector4::y, and csVector4::z.

bool csShaderVariable::GetValue float &    value [inline]
 

Retrieve a float.

Definition at line 113 of file shadervar.h.

References csVector4::x.

bool csShaderVariable::GetValue int &    value [inline]
 

Retireve an int.

Definition at line 105 of file shadervar.h.

void csShaderVariable::SetAccessor iShaderVariableAccessor   a [inline]
 

Set an accessor to use when getting the value.

Definition at line 99 of file shadervar.h.

void csShaderVariable::SetType VariableType    t [inline]
 

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

Definition at line 96 of file shadervar.h.

References VariableType.

bool csShaderVariable::SetValue const csVector4   value [inline]
 

Store a csVector4.

Definition at line 255 of file shadervar.h.

References csVector4::Set(), csVector4::w, csVector4::x, csVector4::y, and csVector4::z.

bool csShaderVariable::SetValue const csVector3   value [inline]
 

Store a csVector3.

Definition at line 246 of file shadervar.h.

References csVector4::Set(), csVector3::x, csVector3::y, and csVector3::z.

bool csShaderVariable::SetValue const csVector2   value [inline]
 

Store a csVector2.

Definition at line 237 of file shadervar.h.

References csVector4::Set(), csVector2::x, and csVector2::y.

bool csShaderVariable::SetValue iRenderBuffer   value [inline]
 

Store a render buffer.

Definition at line 229 of file shadervar.h.

bool csShaderVariable::SetValue iTextureWrapper   value [inline]
 

Store a texture wrapper.

Definition at line 219 of file shadervar.h.

References iTextureWrapper::GetTextureHandle().

bool csShaderVariable::SetValue iTextureHandle   value [inline]
 

Store a texture handle.

Definition at line 211 of file shadervar.h.

bool csShaderVariable::SetValue const csRGBpixel   value [inline]
 

Store a color.

Definition at line 200 of file shadervar.h.

References csRGBpixel::alpha, csRGBpixel::blue, csRGBpixel::green, csRGBpixel::red, csVector4::w, csVector4::x, csVector4::y, and csVector4::z.

bool csShaderVariable::SetValue float    value [inline]
 

Store a float.

Definition at line 191 of file shadervar.h.

References csVector4::Set().

bool csShaderVariable::SetValue int    value [inline]
 

Store an int.

Definition at line 181 of file shadervar.h.

References csVector4::Set().


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