OGRE
13.6
Object-Oriented Graphics Rendering Engine
|
A class that represents a function operand (its the combination of a parameter the in/out semantic and the used fields) More...
#include <OgreShaderFunctionAtom.h>
Public Types | |
enum | OpMask : uchar { OPM_NONE = 0 , OPM_X = 0x0001 , OPM_Y = 0x0002 , OPM_Z = 0x0004 , OPM_W = 0x0008 , OPM_XY = OPM_X | OPM_Y , OPM_XZ = OPM_X | OPM_Z , OPM_XW = OPM_X | OPM_W , OPM_YZ = OPM_Y | OPM_Z , OPM_YW = OPM_Y | OPM_W , OPM_ZW = OPM_Z | OPM_W , OPM_XYZ = OPM_X | OPM_Y | OPM_Z , OPM_XYW = OPM_X | OPM_Y | OPM_W , OPM_XZW = OPM_X | OPM_Z | OPM_W , OPM_YZW = OPM_Y | OPM_Z | OPM_W , OPM_XYZW = OPM_X | OPM_Y | OPM_Z | OPM_W , OPM_ALL = OPM_XYZW } |
enum | OpSemantic { OPS_IN , OPS_OUT , OPS_INOUT } |
Public Member Functions | |
Operand (const Operand &rhs) | |
Copy constructor. More... | |
Operand (ParameterPtr parameter, OpSemantic opSemantic, OpMask opMask=OPM_ALL, ushort indirectionLevel=0) | |
Class constructor. More... | |
~Operand () | |
Class destructor. More... | |
ushort | getIndirectionLevel () const |
Returns the level of indirection. More... | |
OpMask | getMask () const |
Returns the mask bitfield. More... | |
const ParameterPtr & | getParameter () const |
Returns the parameter object as weak reference. More... | |
OpSemantic | getSemantic () const |
Returns the operand semantic (do we read/write or both with the parameter). More... | |
bool | hasFreeFields () const |
Returns true if not all fields used. More... | |
Operand & | mask (OpMask opMask) |
Operand & | operator= (const Operand &rhs) |
Copy the given Operand to this Operand. More... | |
void | setMaskToParamType () |
automatically set swizzle to match parameter arity More... | |
Operand & | w () |
void | write (std::ostream &os) const |
write the parameter name and the usage mask like this 'color.xyz' More... | |
Operand & | x () |
Operand & | xy () |
Operand & | xyz () |
Operand & | y () |
Operand & | z () |
Static Public Member Functions | |
static int | getFloatCount (int mask) |
Return the float count of the given mask. More... | |
A class that represents a function operand (its the combination of a parameter the in/out semantic and the used fields)
Ogre::RTShader::Operand::Operand | ( | ParameterPtr | parameter, |
OpSemantic | opSemantic, | ||
OpMask | opMask = OPM_ALL , |
||
ushort | indirectionLevel = 0 |
||
) |
Class constructor.
parameter | A function parameter. |
opSemantic | The in/out semantic of the parameter. |
opMask | The field mask of the parameter. |
indirectionLevel |
Ogre::RTShader::Operand::Operand | ( | const Operand & | rhs | ) |
Copy constructor.
Ogre::RTShader::Operand::~Operand | ( | ) |
Class destructor.
|
inline |
Returns the parameter object as weak reference.
|
inline |
Returns true if not all fields used.
(usage is described through semantic)
|
inline |
Returns the mask bitfield.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Ogre::RTShader::Operand::setMaskToParamType | ( | ) |
automatically set swizzle to match parameter arity
|
inline |
Returns the operand semantic (do we read/write or both with the parameter).
|
inline |
Returns the level of indirection.
The greater the indirection level the more the parameter needs to be nested in brackets. For example given 4 parameters x1...x4 with the indirections levels 0,1,1,2 respectively. The parameters should form the following string: x1[x2][x3[x4]].
void Ogre::RTShader::Operand::write | ( | std::ostream & | os | ) | const |
write the parameter name and the usage mask like this 'color.xyz'
|
static |
Return the float count of the given mask.