Ogre::RTShader::Operand Class Reference
Core » RTShader

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:
[legend]

## Public Types

enum

OpMask {
OPM_ALL = 0x0001, OPM_X = 0x0002, OPM_Y = 0x0004, OPM_Z = 0x0008,
OPM_W = 0x0010, 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
}

enum | OpSemantic { OPS_IN, OPS_OUT, OPS_INOUT }

## Public Member Functions

| Operand (ParameterPtr parameter, Operand::OpSemantic opSemantic, int opMask=Operand::OPM_ALL, ushort indirectionLevel=0)
| Class constructor. More...
| Operand (const Operand &rhs)
| Copy constructor. More...
| ~Operand ()
| Class destructor. More...
ushort | getIndirectionLevel () const
| Returns the level of indirection. More...
int | 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...
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)
Operand & | operator= (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

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

## 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

## OpMask

enum Ogre::RTShader::Operand::OpMask

Enumerator
OPM_ALL |
OPM_X |
OPM_Y |
OPM_Z |
OPM_W |
OPM_XY |
OPM_XZ |
OPM_XW |
OPM_YZ |
OPM_YW |
OPM_ZW |
OPM_XYZ |
OPM_XYW |
OPM_XZW |
OPM_YZW |
OPM_XYZW |

Definition at line 96 of file OgreShaderFunctionAtom.h.

## OpSemantic

enum Ogre::RTShader::Operand::OpSemantic

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

## Operand() [1/2]

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

Class constructor.

Parameters

  parameter | A function parameter.
  opSemantic | The in/out semantic of the parameter.
  opMask | The field mask of the parameter.

## Operand() [2/2]

Ogre::RTShader::Operand::Operand | ( | const Operand & | rhs | ) |

Copy constructor.

## ~Operand()

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

Class destructor.

## Member Function Documentation

## getFloatCount()

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

static

Return the float count of the given mask.

## getGpuConstantType()

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

static

Return the gpu constant type of the given mask.

## getIndirectionLevel()

ushort Ogre::RTShader::Operand::getIndirectionLevel | ( |  | ) | const

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

## getMask()

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

Returns the mask bitfield.

Definition at line 141 of file OgreShaderFunctionAtom.h.

## getMaskAsString()

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

static

Returns the given mask as string representation.

## getParameter()

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

Returns the parameter object as weak reference.

Definition at line 135 of file OgreShaderFunctionAtom.h.

## getSemantic()

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

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

Definition at line 144 of file OgreShaderFunctionAtom.h.

## hasFreeFields()

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

Returns true if not all fields used.

(usage is described through semantic)

Definition at line 138 of file OgreShaderFunctionAtom.h.

## operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |

inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

## operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |

inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

## operator delete() [3/3]

template<class Alloc >

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

inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [1/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |

inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [2/2]

template<class Alloc >

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

inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

## operator new() [1/3]

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 68 of file OgreMemoryAllocatedObject.h.

## operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |

inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

## operator new() [3/3]

template<class Alloc >

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

inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

## operator new[]() [1/2]

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 86 of file OgreMemoryAllocatedObject.h.

## operator new[]() [2/2]

template<class Alloc >

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

inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

## operator=()

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

Copy the given Operand to this Operand.

Parameters

  rhs | The other Operand to copy to this state.

## toString()

String Ogre::RTShader::Operand::toString | ( |  | ) | const

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

## Member Data Documentation

## mIndirectionLevel

ushort Ogre::RTShader::Operand::mIndirectionLevel

protected

The level of indirection.

See also
  getIndirectionLevel

Definition at line 173 of file OgreShaderFunctionAtom.h.

## mMask

int Ogre::RTShader::Operand::mMask

protected

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

Definition at line 171 of file OgreShaderFunctionAtom.h.

## mParameter

ParameterPtr Ogre::RTShader::Operand::mParameter

protected

The parameter being carried by the operand.

Definition at line 167 of file OgreShaderFunctionAtom.h.

## mSemantic

OpSemantic Ogre::RTShader::Operand::mSemantic

protected

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

Definition at line 169 of file OgreShaderFunctionAtom.h.

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

- OgreShaderFunctionAtom.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.