#include <ShVariable.hpp>
Inheritance diagram for SH::ShVariable:
Public Member Functions | |
ShVariable (const ShVariableNodePtr &node) | |
ShVariable (const ShVariableNodePtr &node, const ShSwizzle &swizzle, bool neg) | |
ShVariable & | operator= (const ShProgram &prg) |
bool | null () const |
true iff node is a null pointer. | |
bool | uniform () const |
Is this a uniform (non-shader specific) variable? | |
bool | hasValues () const |
Does this variable have constant (host-local) values? | |
int | size () const |
Get the number of elements in this variable, after swizzling. | |
const ShSwizzle & | swizzle () const |
Obtain the swizzling (if any) applied to this variable. | |
const ShVariableNodePtr & | node () const |
Obtain the actual node this variable refers to. | |
bool | neg () const |
Return true if this variable is negated. | |
bool & | neg () |
void | getValues (ShVariableNode::ValueType dest[]) const |
Get the values of this variable, with swizzling taken into account. | |
ShVariableNode::ValueType | getValue (int index) const |
void | setValues (ShVariableNode::ValueType values[]) |
Set the values of this variable, using the swizzle as a writemask. | |
void | setValue (int index, ShVariableNode::ValueType value) |
ShVariable | operator() () const |
Identity swizzle. | |
ShVariable | operator() (int) const |
ShVariable | operator() (int, int) const |
ShVariable | operator() (int, int, int) const |
ShVariable | operator() (int, int, int, int) const |
ShVariable | operator() (int size, int indices[]) const |
ShVariable | operator- () const |
bool | operator== (const ShVariable &other) const |
bool | operator!= (const ShVariable &other) const |
void | clone (const ShVariable &other) |
Metadata | |
This data is useful for various things, including asset management. | |
void | range (ShVariableNode::ValueType low, ShVariableNode::ValueType high) |
Set a range of values for this variable. | |
ShVariableNode::ValueType | lowBound () const |
Obtain a lower bound on this variable. | |
ShVariableNode::ValueType | highBound () const |
Obtain an upper bound on this variable. | |
Protected Attributes | |
ShVariableNodePtr | m_node |
The actual variable node we refer to. | |
ShSwizzle | m_swizzle |
Swizzling applied to this variable. | |
bool | m_neg |
True iff this variable is negated. | |
Friends | |
SH_DLLEXPORT std::ostream & | operator<< (std::ostream &out, const ShVariable &shVariableToPrint) |
Note: subclasses should not keep any additional data. All data relevant to the node should be stored in m_node. This is due to instances of subclasses of ShVariable being sliced when they get placed in ShStatements.
Definition at line 47 of file ShVariable.hpp.