OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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:
+ Collaboration diagram for Ogre::RTShader::Operand:

Public Types

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

Public Member Functions

 Operand (ParameterPtr parameter, Operand::OpSemantic opSemantic, int opMask=Operand::OPM_ALL)
 Class constructor. More...
 
 Operand (const Operand &rhs)
 Copy constructor. More...
 
 ~Operand ()
 Class destructor. More...
 
int getMask () const
 Returns the mask bitfield. More...
 
const ParameterPtrgetParameter () 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...
 
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 *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
Operandoperator= (const Operand &rhs)
 Copy the given Operand to this Operand. More...
 
String toString () const
 Returns the parameter name and the usage mask like this 'color.xyz'. More...
 

Static Public Member Functions

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

Protected Attributes

int mMask
 
ParameterPtr mParameter
 
OpSemantic mSemantic
 

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 78 of file OgreShaderFunctionAtom.h.

Member Enumeration Documentation

Enumerator
OPM_ALL 
OPM_X 
OPM_Y 
OPM_Z 
OPM_W 

Definition at line 94 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 83 of file OgreShaderFunctionAtom.h.

Constructor & Destructor Documentation

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

Class constructor.

Parameters
parameterA function parameter.
opSemanticThe in/out semantic of the parameter.
opMaskThe field mask of the parameter.
Ogre::RTShader::Operand::Operand ( const Operand rhs)

Copy constructor.

Ogre::RTShader::Operand::~Operand ( )

Class destructor.

Member Function Documentation

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

Return the float count of the given mask.

static GpuConstantType Ogre::RTShader::Operand::getGpuConstantType ( int  mask)
static

Return the gpu constant type of the given mask.

int Ogre::RTShader::Operand::getMask ( ) const
inline

Returns the mask bitfield.

Definition at line 128 of file OgreShaderFunctionAtom.h.

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

Returns the given mask as string representation.

const ParameterPtr& Ogre::RTShader::Operand::getParameter ( ) const
inline

Returns the parameter object as weak reference.

Definition at line 122 of file OgreShaderFunctionAtom.h.

OpSemantic Ogre::RTShader::Operand::getSemantic ( ) const
inline

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

Definition at line 131 of file OgreShaderFunctionAtom.h.

bool Ogre::RTShader::Operand::hasFreeFields ( ) const
inline

Returns true if not all fields used.

(usage is described through semantic)

Definition at line 125 of file OgreShaderFunctionAtom.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 95 of file OgreMemoryAllocatedObject.h.

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

Definition at line 101 of file OgreMemoryAllocatedObject.h.

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

Definition at line 107 of file OgreMemoryAllocatedObject.h.

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

Definition at line 112 of file OgreMemoryAllocatedObject.h.

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

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 
)
inlineinherited

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)
inlineinherited

Definition at line 72 of file OgreMemoryAllocatedObject.h.

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

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 
)
inlineinherited

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)
inlineinherited

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.
String Ogre::RTShader::Operand::toString ( ) const

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

Member Data Documentation

int Ogre::RTShader::Operand::mMask
protected

Definition at line 148 of file OgreShaderFunctionAtom.h.

ParameterPtr Ogre::RTShader::Operand::mParameter
protected

Definition at line 146 of file OgreShaderFunctionAtom.h.

OpSemantic Ogre::RTShader::Operand::mSemantic
protected

Definition at line 147 of file OgreShaderFunctionAtom.h.


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