The IVariable graph node interface.
Variable nodes provide a generic bridge between user logic code and certain scene graph nodes as well as a means for simple arithmetic operations within the scene graph. Variable nodes serve as input for e.g. controllers that implement the Graph::IVariableController interface, or Graph::IClipTransition nodes.
Depending on the actual operation given (IEnums::ALU_OPERATION_*), certain constraints apply to the given input and output data types (inType and outType: IEnums::VARIABLE_TYPE_*) as well as number of constant and variable inputs and outputs (numIn and numOut):
- COPY and REPLACE: numIn==1, numOut==0, inType==outType Result equals input operand #0.
- ADD, SUBTRACT, SUBTRACT_REVERSE, MULTIPLY, DIVIDE, DIVIDE_REVERSE: numIn>=2, numOut==0, inType==outType, inType==SINT32||REAL Result is the combined operation over all input operands.
- MAP, MAP_CLAMPED: numIn>=3, numIn==numOut, inType==REAL Input operands 1..N represent an either strictly ascending or descending sequence of values that map input operand 0 linearly to their corresponding output values (not necessarily in strict order). MAP_CLAMPED clamps the result to the given first or last output operand, if input #0 is outside the range of inputs 1..N. Output #0 is ignored.
- LESS, LESS_OR_EQUAL, GREATER, GREATER_OR_EQUAL: numIn==2, numOut==0, outType==BOOL, inType==SINT32||REAL Result is boolean true or false depending on comparison outcome.
- EQUAL, NOT_EQUAL: numIn==2, numOut==0, outType==BOOL, inType==SINT32||REAL||BOOL Result is boolean true or false depending on comparison outcome.
- NEGATE: numIn==1, numOut==0, inType==outType, inType==SINT32||REAL Result is the negated input #0 (-value).
- INVERT: numIn==1, numOut==0, inType==outType, inType==SINT32||BOOL Result is bitwise (SINT32) or logically (BOOL) inverted.
- AND, OR, XOR: numIn>=2, numOut==0, inType==outType, inType==SINT32||BOOL Result is the bitwise (SINT32) or logical (BOOL) outcome of operation.
|
virtual INode * | GetNodeInterface ()=0 |
| Get the mutable Graph::INode interface. More...
|
|
virtual const INode * | GetNodeInterface () const =0 |
| Get the constant Graph::INode interface. More...
|
|
virtual Bool | SetInputType (IEnums::VariableType type)=0 |
| Set the data type for all constant input operands. More...
|
|
virtual IEnums::VariableType | GetInputType () const =0 |
| Get the data type for all constant input operands. More...
|
|
virtual Bool | SetOutputType (IEnums::VariableType type)=0 |
| Set the output data type. More...
|
|
virtual IEnums::VariableType | GetOutputType () const =0 |
| Get the output data type. More...
|
|
virtual Bool | SetOperation (IEnums::AluOperation operation)=0 |
| Set the arithmetic/logic operation to perform. More...
|
|
virtual IEnums::AluOperation | GetOperation () const =0 |
| Get the arithmetic/logic operation performed. More...
|
|
virtual Bool | SetAutoResetEnabled (Bool enabled)=0 |
| Enable/disable auto-resetting. More...
|
|
virtual Bool | IsAutoResetEnabled () const =0 |
| Check if auto-resetting is enabled. More...
|
|
virtual IVariableNodeTarget * | GetVariableInputOperandNodeTarget ()=0 |
| Get the mutable Graph::IVariableNodeTarget container referencing the input variables. More...
|
|
virtual const IVariableNodeTarget * | GetVariableInputOperandNodeTarget () const =0 |
| Get the constant Graph::IVariableNodeTarget container referencing the input variables. More...
|
|
virtual IVariableNodeTarget * | GetVariableOutputOperandNodeTarget ()=0 |
| Get the mutable Graph::IVariableNodeTarget container referencing the output variables. More...
|
|
virtual const IVariableNodeTarget * | GetVariableOutputOperandNodeTarget () const =0 |
| Get the constant Graph::IVariableNodeTarget container referencing the output variables. More...
|
|
virtual Bool | SetConstantInputOperand (UInt32 index, const String &value)=0 |
| Set a constant string input value at a given index. More...
|
|
virtual Bool | SetConstantInputOperand (UInt32 index, Bool value)=0 |
| Set a constant boolean input value at a given index. More...
|
|
virtual Bool | SetConstantInputOperand (UInt32 index, Real value)=0 |
| Set a constant floating-point input value at a given index. More...
|
|
virtual Bool | SetConstantInputOperand (UInt32 index, SInt32 value)=0 |
| Set a constant integer input value at a given index. More...
|
|
virtual Bool | GetConstantInputOperand (UInt32 index, Bool &value) const =0 |
| Get a constant boolean input value at a given index. More...
|
|
virtual Bool | GetConstantInputOperand (UInt32 index, Real &value) const =0 |
| Get a constant floating-point input value at a given index. More...
|
|
virtual Bool | GetConstantInputOperand (UInt32 index, SInt32 &value) const =0 |
| Get a constant integer input value at a given index. More...
|
|
virtual Bool | SetConstantOutputOperand (UInt32 index, const String &value)=0 |
| Set a constant string output value at a given index. More...
|
|
virtual Bool | SetConstantOutputOperand (UInt32 index, Bool value)=0 |
| Set a constant boolean output value at a given index. More...
|
|
virtual Bool | SetConstantOutputOperand (UInt32 index, Real value)=0 |
| Set a constant floating-point output value at a given index. More...
|
|
virtual Bool | SetConstantOutputOperand (UInt32 index, SInt32 value)=0 |
| Set a constant integer output value at a given index. More...
|
|
virtual Bool | GetConstantOutputOperand (UInt32 index, Bool &value) const =0 |
| Get a constant boolean output value at a given index. More...
|
|
virtual Bool | GetConstantOutputOperand (UInt32 index, Real &value) const =0 |
| Get a constant floating-point output value at a given index. More...
|
|
virtual Bool | GetConstantOutputOperand (UInt32 index, SInt32 &value) const =0 |
| Get a constant integer output value at a given index. More...
|
|
virtual Bool | GetValue (Bool &value) const =0 |
| Try to get the result as a boolean value. More...
|
|
virtual Bool | GetValue (Real &value) const =0 |
| Try to get the result as a floating-point value. More...
|
|
virtual Bool | GetValue (SInt32 &value) const =0 |
| Try to get the result as a integer value. More...
|
|