Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
Ogre::RTShader::Operand Class Reference

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>

Inheritance diagram for Ogre::RTShader::Operand:
Inheritance graph
[legend]

List of all members.

Public Types

enum  OpSemantic { OPS_IN, OPS_OUT, OPS_INOUT }
enum  OpMask {
  OPM_ALL = 1 << 0, OPM_X = 1 << 1, OPM_Y = 1 << 2, OPM_Z = 1 << 3,
  OPM_W = 1 << 4
}

Public Member Functions

 Operand (ParameterPtr parameter, Operand::OpSemantic opSemantic, int opMask=Operand::OPM_ALL, ushort indirectionLevel=0)
 Class constructor.
 Operand (const Operand &rhs)
 Copy constructor.
Operandoperator= (const Operand &rhs)
 Copy the given Operand to this Operand.
 ~Operand ()
 Class destructor.
const ParameterPtrgetParameter () const
 Returns the parameter object as weak reference.
bool hasFreeFields () const
 Returns true if not all fields used.
int getMask () const
 Returns the mask bitfield.
OpSemantic getSemantic () const
 Returns the operand semantic (do we read/write or both with the parameter).
ushort getIndirectionLevel () const
 Returns the level of indirection.
String toString () const
 Returns the parameter name and the usage mask like this 'color.xyz'.
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
void * operator new (size_t sz)
void * operator new (size_t sz, void *ptr)
 placement operator new
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
void * operator new[] (size_t sz)
void operator delete (void *ptr)
void operator delete (void *ptr, void *)
void operator delete (void *ptr, const char *, int, const char *)
void operator delete[] (void *ptr)
void operator delete[] (void *ptr, const char *, int, const char *)

Static Public Member Functions

static String getMaskAsString (int mask)
 Returns the given mask as string representation.
static int getFloatCount (int mask)
 Return the float count of the given mask.
static GpuConstantType getGpuConstantType (int mask)
 Return the gpu constant type of the given mask.

Protected Attributes

ParameterPtr mParameter
 The parameter being carried by the operand.
OpSemantic mSemantic
 Tells if the parameter is of type input,output or both.
int mMask
 Which part of the parameter should be passed (x,y,z,w)
ushort mIndirectionLevel
 The level of indirection.

Detailed Description

A class that represents a function operand (its the combination of a parameter the in/out semantic and the used fields)

Definition at line 80 of file OgreShaderFunctionAtom.h.


Member Enumeration Documentation

Enumerator:
OPM_ALL 
OPM_X 
OPM_Y 
OPM_Z 
OPM_W 

Definition at line 96 of file OgreShaderFunctionAtom.h.

Enumerator:
OPS_IN 

The parameter is a input parameter.

OPS_OUT 

The parameter is a output parameter.

OPS_INOUT 

The parameter is a input/output parameter.

Definition at line 85 of file OgreShaderFunctionAtom.h.


Constructor & Destructor Documentation

Ogre::RTShader::Operand::Operand ( ParameterPtr  parameter,
Operand::OpSemantic  opSemantic,
int  opMask = Operand::OPM_ALL,
ushort  indirectionLevel = 0 
)

Class constructor.

Parameters:
parameterA function parameter.
opSemanticThe in/out semantic of the parameter.
opMaskThe field mask of the parameter.

Copy constructor.

Class destructor.


Member Function Documentation

static int Ogre::RTShader::Operand::getFloatCount ( int  mask) [static]

Return the float count of the given mask.

Return the gpu constant type of the given mask.

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]].

Definition at line 140 of file OgreShaderFunctionAtom.h.

Returns the mask bitfield.

Definition at line 130 of file OgreShaderFunctionAtom.h.

static String Ogre::RTShader::Operand::getMaskAsString ( int  mask) [static]

Returns the given mask as string representation.

Returns the parameter object as weak reference.

Definition at line 124 of file OgreShaderFunctionAtom.h.

Returns the operand semantic (do we read/write or both with the parameter).

Definition at line 133 of file OgreShaderFunctionAtom.h.

Returns true if not all fields used.

(usage is described through semantic)

Definition at line 127 of file OgreShaderFunctionAtom.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr) [inherited]

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
) [inherited]

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
) [inherited]

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr) [inherited]

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
) [inherited]

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
) [inherited]

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz) [inherited]

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
) [inherited]

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
) [inherited]

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz) [inherited]

Definition at line 90 of file OgreMemoryAllocatedObject.h.

Operand& Ogre::RTShader::Operand::operator= ( const Operand rhs)

Copy the given Operand to this Operand.

Parameters:
rhsThe other Operand to copy to this state.

Returns the parameter name and the usage mask like this 'color.xyz'.


Member Data Documentation

The level of indirection.

See also:
getIndirectionLevel

Definition at line 162 of file OgreShaderFunctionAtom.h.

Which part of the parameter should be passed (x,y,z,w)

Definition at line 160 of file OgreShaderFunctionAtom.h.

The parameter being carried by the operand.

Definition at line 156 of file OgreShaderFunctionAtom.h.

Tells if the parameter is of type input,output or both.

Definition at line 158 of file OgreShaderFunctionAtom.h.


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

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:28:05