Bindings set the value of a property or property field with the value from another property, property field, or a data source. More...
Classes | |
class | kanzi::AbstractBinding |
AbstractBinding is the base class for binding classes. More... | |
class | kanzi::AbstractBindingRuntime |
Base class for binding runtimes. More... | |
class | kanzi::AbstractBindingVariableSource |
Abstract interface for VariableBindingSources and VariableExpressionValueSource. More... | |
class | kanzi::AbstractExpressionValueSource |
Value source base for use in bindings with multiple sources. More... | |
class | kanzi::AbstractExpressionValueSourceRuntime |
Runtime base class for expression value sources. More... | |
class | kanzi::AnimationBindingProcessor |
Animation binding processor executes an animation and calculates the value for use in expression bindings. More... | |
class | kanzi::Binding |
Binding is the simplest form of binding. More... | |
class | kanzi::BindingBaseRuntime |
Base runtime class for simple one-on-one bindings. More... | |
struct | kanzi::BindingExpressionOpCode |
Expression binding operation. More... | |
struct | kanzi::BindingExpressionOpCodeParameters |
Runtime Parameters for binding expression opcodes. More... | |
class | kanzi::BindingHostConcept |
BindingHostConcept specifies an interface for adding and removing bindings to the binding host. More... | |
class | kanzi::BindingHostConceptImpl< TDerivedClass > |
Implementation class for BindingHostConcept. More... | |
struct | kanzi::BindingLoadInfo |
Use the BindingLoadInfo to create the information for a binding that you need when adding the binding to an object. More... | |
class | kanzi::BindingLookupContext |
Lookup context for bindings. More... | |
class | kanzi::BindingLookupNotificationBase |
Base class for notifications on binding lookup. More... | |
class | kanzi::BindingNodeLookupContext |
Binding lookup context for Node. More... | |
class | kanzi::BindingProcessor |
Binding processor. More... | |
class | kanzi::BindingRenderPassLookupContext |
Binding lookup context for RenderPass. More... | |
class | kanzi::BindingRenderValueLookupContext |
Binding lookup context for render value associations. More... | |
class | kanzi::BindingRuntime |
Runtime for binding. More... | |
class | kanzi::BindingRuntimeHandle |
Handler for binding runtimes. More... | |
class | kanzi::BindingSource |
Binding source contains all the persistent data that you need to access a source value for the binding. More... | |
class | kanzi::BindingSourceRuntime |
Binding source runtime interface. More... | |
class | kanzi::BindingTargetRuntime |
Binding target runtime interface. More... | |
class | kanzi::BindingToken |
Helper class that manages the lifetime of the runtime binding owned by a Node or a RenderPass, by removing the owned binding on the destruction of that Node or the RenderPass. More... | |
class | kanzi::BindingTriggerLookupContext |
Binding lookup context for Node. More... | |
class | kanzi::BindingValueSourceOwner |
Owner for value source bindings. More... | |
class | kanzi::CallbackBindingProcessor |
Callback processor. More... | |
class | kanzi::ConstraintBindingProcessor |
Binding processor structure for constraints. More... | |
class | kanzi::ExpressionBinding |
ExpressionBinding enables you to bind from multiple sources to one target, and to modify the values before writing them to target values. More... | |
class | kanzi::ExpressionBindingProcessor |
Expression binding processor. More... | |
class | kanzi::ExpressionBindingRuntime |
Runtime for expression binding. More... | |
class | kanzi::ExpressionBindingSource |
Expression binding source collects expression value sources and executes operations on the values to produce a read result. More... | |
class | kanzi::ExpressionBindingSourceRuntime |
Runtime for expression binding source. More... | |
Typedefs | |
typedef bool(* | kanzi::BindingExpressionFunction) (BindingExpressionOpCodeParameters ¶ms) |
Expression function pointer type. More... | |
Functions | |
int | kanzi::bindingExpressionDivide (int lhs, int rhs) |
Integer divide the expression way. More... | |
float | kanzi::bindingExpressionDivide (float lhs, float rhs) |
Floating point divide the expression way. More... | |
ColorRGBA | kanzi::bindingExpressionDivide (const ColorRGBA &lhs, const ColorRGBA &rhs) |
Color divide the expression way. More... | |
Vector2 | kanzi::bindingExpressionDivide (const Vector2 &lhs, const Vector2 &rhs) |
Vector2 divide the expression way. More... | |
Vector3 | kanzi::bindingExpressionDivide (const Vector3 &lhs, const Vector3 &rhs) |
Vector3 divide the expression way. More... | |
Vector4 | kanzi::bindingExpressionDivide (const Vector4 &lhs, const Vector4 &rhs) |
Vector4 divide the expression way. More... | |
BindingExpressionFunction | kanzi::bindingExpressionFunctionFromOperation (KzuExpressionValidatorOperation operation) |
Converts expression validation operation to a binding expression function. More... | |
int | kanzi::bindingExpressionModulo (int lhs, int rhs) |
Integer modulo the expression way. More... | |
float | kanzi::bindingExpressionModulo (float lhs, float rhs) |
Floating point modulo the expression way. More... | |
ColorRGBA | kanzi::bindingExpressionModulo (const ColorRGBA &lhs, const ColorRGBA &rhs) |
Color modulo the expression way. More... | |
Vector2 | kanzi::bindingExpressionModulo (const Vector2 &lhs, const Vector2 &rhs) |
Vector2 modulo the expression way. More... | |
Vector3 | kanzi::bindingExpressionModulo (const Vector3 &lhs, const Vector3 &rhs) |
Vector3 modulo the expression way. More... | |
Vector4 | kanzi::bindingExpressionModulo (const Vector4 &lhs, const Vector4 &rhs) |
Vector4 modulo the expression way. More... | |
int | kanzi::bindingExpressionRemainder (int lhs, int rhs) |
Integer remainder the expression way. More... | |
float | kanzi::bindingExpressionRemainder (float lhs, float rhs) |
Floating point remainder the expression way. More... | |
ColorRGBA | kanzi::bindingExpressionRemainder (const ColorRGBA &lhs, const ColorRGBA &rhs) |
Color remainder the expression way. More... | |
Vector2 | kanzi::bindingExpressionRemainder (const Vector2 &lhs, const Vector2 &rhs) |
Vector2 remainder the expression way. More... | |
Vector3 | kanzi::bindingExpressionRemainder (const Vector3 &lhs, const Vector3 &rhs) |
Vector3 remainder the expression way. More... | |
Vector4 | kanzi::bindingExpressionRemainder (const Vector4 &lhs, const Vector4 &rhs) |
Vector4 remainder the expression way. More... | |
ColorRGBA | kanzi::bindingFixedOperationGetAmbient (Node &node, const Material &material) |
Fixed operation to acquire ambient color. More... | |
Matrix4x4 | kanzi::bindingFixedOperationGetCameraNormalMatrix (RenderPass &renderPass, Node &node) |
Fixed operation to acquire camera normal matrix. More... | |
Vector3 | kanzi::bindingFixedOperationGetCameraPosition (RenderPass &renderPass) |
Fixed operation to acquire camera position vector. More... | |
Matrix4x4 | kanzi::bindingFixedOperationGetCameraWorldMatrix (RenderPass &renderPass, Node &node) |
Fixed operation to acquire camera world matrix. More... | |
Matrix4x4 | kanzi::bindingFixedOperationGetNormalMatrix (Node &node) |
Fixed operation to acquire normal matrix. More... | |
Matrix4x4 | kanzi::bindingFixedOperationGetProjectionCameraWorldMatrix (RenderPass &renderPass, Node &node) |
Fixed operation to acquire projection camera world matrix. More... | |
Vector4 | kanzi::bindingFixedOperationGetViewPosition (RenderPass &renderPass) |
Fixed operation to acquire homogeneous view position vector. More... | |
Matrix4x4 | kanzi::bindingFixedOperationGetWorldMatrix (Node &node) |
Fixed operation to acquire world matrix. More... | |
bool | kanzi::expressionOperationWrite (BindingExpressionOpCodeParameters ¶ms) |
Execute write operation. More... | |
void | kanzi::extractExpressionField (Variant &outputRegister, const Variant &inputRegister, PropertyField field) |
Reads a field from an input register and writes it to the output register. More... | |
string | kanzi::getExpressionOperationName (KzuExpressionValidatorOperation operation) |
Gets a string representation of an expression validator operator. More... | |
Quaternion | kanzi::getQuaternionField (const Variant &variant, PropertyField field) |
Gets a quaternion field from a variant. More... | |
bool | kanzi::isFixedOperationOpCode (KzuExpressionValidatorOperation opCode) |
Tells if given operation code corresponds with a fixed operation. More... | |
BindingLoadInfo | kanzi::loadBinding (KzbFile &kzbFile, KzbMemoryParser &parser) |
Loads a binding from a kzb file. More... | |
void | kanzi::loadBindings (KzbFile &kzbFile, KzbMemoryParser &parser, vector< BindingLoadInfo > &bindings) |
Loads bindings from a kzb file. More... | |
PropertyField | kanzi::propertyFieldFromBinaryTargetAttribute (KzuPropertyBinaryTargetAttribute attribute) |
Converts a property target attribute from binary into a property field. More... | |
bool | kanzi::variantSetToDataObject (const Variant &value, DataObject &dataObject) |
Sets variant value to a data object. More... | |
Bindings set the value of a property or property field with the value from another property, property field, or a data source.
Bindings allow nodes, render passes, states, state objects, and styles to automatically update the values of their properties in response to the changing property values, or the occurrence of some external event.
typedef bool(* kanzi::BindingExpressionFunction) (BindingExpressionOpCodeParameters ¶ms) |
Expression function pointer type.
params | All expression operation code parameters. |
enum kanzi::BindingMode |
Binding mode (binary file).
Enumerator | |
---|---|
BindingModeInvalid |
Invalid binding mode. |
BindingModeOneWay |
One-way binding. |
BindingModeTwoWay |
Two-way binding. |
BindingModeToSource |
To Source binding. |
Binding precedence (binary file).
Binding property field (binary file).
Expression argument type from binary data.
Converted to runtime argument type for binding operations.
enum kanzi::BindingExpressionArgumentType : int16_t |
Runtime expression validator argument type.
A bitmask is used to speed up access to register arrays and remove the need for division.
The encoding intentionally ensures only 16 bits are needed for the enumeration.
enum kanzi::KzuExpressionValidatorOperation : int16_t |
Expression operation.
Each operation in an expression binding is identified by an integer operation code.
All operations that can be executed component-wise are executed per-component. For example, the division of two vector2 components is [param1.x / param2.x, param1.y / param2.y]. The same applies to single-parameter operations. For example, absolute value is [abs(param1.x), abs(param1.y)].
You can define arguments specifying an arbitrary rotation as either SRT3D Euler rotations or quaternions.
Operations are encoded as follows:
Since only the operation codes come from the binary format, the remaining values can be mapped anywhere without breaking loading.
The encoding intentionally ensures only 16 bits are needed for the enumeration.
Enumerator | |
---|---|
KZU_EXPRESSION_VALIDATOR_OPERATION_WRITE |
Simple write operation. |
KZU_EXPRESSION_VALIDATOR_OPERATION_ADD |
Addition: param1 + param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_SUBTRACT |
Subtraction: param1 - param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_MULTIPLY |
Multiplication: param1 * param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_DIVIDE |
Division, param1 / param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_MODULO |
Modulo: param1 mod param2 NOTE: This is the actual modulo operation, not remainder. |
KZU_EXPRESSION_VALIDATOR_OPERATION_ABS |
Absolute value: abs(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_MIN |
Minimum value: min(param1, param2) |
KZU_EXPRESSION_VALIDATOR_OPERATION_MAX |
Maximum value: max(param1, param2) |
KZU_EXPRESSION_VALIDATOR_OPERATION_CEIL |
Round towards positive infinity: ceil(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_FLOOR |
Round towards negative infinity: floor(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_ROUND |
Round towards nearest integer or away from zero if halfway: round(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_POW |
Exponent: pow(param1, param2) |
KZU_EXPRESSION_VALIDATOR_OPERATION_SQRT |
Square root: sqrt(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_STEP |
Step function of param1 to param2 border. 1 if param1 >= param2, 0 otherwise |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_BOOL |
Converts to boolean: bool(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_INT |
Converts to integer: int(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_FLOAT |
Converts to float: float(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_STRING |
Converts to string: to_string(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_REMAINDER |
Remainder: param1 % param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION |
Create a rotation quaternion using Euler angles stored in param1, param2 and param3. |
KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION_X |
Create a rotation quaternion using X rotation Euler angle in param1. |
KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION_Y |
Create a rotation quaternion using Y rotation Euler angle in param1. |
KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION_Z |
Create a rotation quaternion using Z rotation Euler angle in param1. |
KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE |
Rotate param1 by rotation defined in param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE_X |
Rotate param1 by X rotation defined in param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE_Y |
Rotate param1 by Y rotation defined in param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE_Z |
Rotate param1 by Z rotation defined in param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_EXTRACT_EULER_X |
Extract X rotation angle from rotation defined in param1. |
KZU_EXPRESSION_VALIDATOR_OPERATION_EXTRACT_EULER_Y |
Extract Y rotation angle from rotation defined in param1. |
KZU_EXPRESSION_VALIDATOR_OPERATION_EXTRACT_EULER_Z |
Extract Z rotation angle from rotation defined in param1. |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CURRENT_VALUE |
Gets the current value of the target. This operation has no parameters, but it returns the value of the binding target before modifications. Used by modifier bindings. |
KZU_EXPRESSION_VALIDATOR_OPERATION_ACQUIRE |
Acquires a resource by a string. |
KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_GREATER |
Greater than comparison. |
KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_GREATER_OR_EQUAL |
Greater than or equal comparison. |
KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_LESS |
Less than comparison. |
KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_LESS_OR_EQUAL |
Less than or equal comparison. |
KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_EQUAL |
Equal comparison. |
KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_NOT_EQUAL |
Not equal comparison. |
KZU_EXPRESSION_VALIDATOR_OPERATION_LOGICAL_AND |
Greater or equal comparison. |
KZU_EXPRESSION_VALIDATOR_OPERATION_LOGICAL_OR |
Greater or equal comparison. |
KZU_EXPRESSION_VALIDATOR_OPERATION_LOGICAL_NOT |
Greater or equal comparison. |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_MATRIX3x3 |
Converts to string: matrix3x3(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_MATRIX4x4 |
Converts to string: matrix4x4(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_SRT2D |
Converts to string: srt2d(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_SRT3D |
Converts to string: srt3d(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_SIN |
Sine: sin(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_COS |
Cosine: cos(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TAN |
Tangent: tan(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_ASIN |
Arcsine: asin(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_ACOS |
Arccosine: acos(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_ATAN |
Arctangent: atan(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_ATAN2 |
2-argument arctangent: atan2(param1, param2) |
KZU_EXPRESSION_VALIDATOR_OPERATION_SINC |
Sinc: sinc(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_DOT |
Dot product: dot(param1, param2) |
KZU_EXPRESSION_VALIDATOR_OPERATION_CROSS |
Cross product: cross(param1, param2) |
KZU_EXPRESSION_VALIDATOR_OPERATION_INVERSE |
Inversion. |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_FIELD |
Get a field by index from a vector or matrix type or an indexed range. |
KZU_EXPRESSION_VALIDATOR_OPERATION_SET_FIELD |
Set a field by index in a vector or matrix type or an indexed range. |
KZU_EXPRESSION_VALIDATOR_OPERATION_TRANSFORM |
Transforms a vector by a same-sized matrix. |
KZU_EXPRESSION_VALIDATOR_OPERATION_CLAMP |
Clamp a value between a floor and a ceiling. |
KZU_EXPRESSION_VALIDATOR_OPERATION_MIX |
Apply linear interpolation between two values. |
KZU_EXPRESSION_VALIDATOR_OPERATION_LINEARSTEP |
Apply linearstep interpolation between two values. |
KZU_EXPRESSION_VALIDATOR_OPERATION_SMOOTHSTEP |
Apply smoothstep interpolation between two values. |
KZU_EXPRESSION_VALIDATOR_OPERATION_SMOOTHERSTEP |
Apply smootherstep interpolation between two values. |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_PROJECTION_CAMERA_WORLD_MATRIX |
Acquire operation for getProjectionCameraWorldMatrix(). |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CAMERA_WORLD_MATRIX |
Acquire operation for getCameraWorldMatrix(). |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_WORLD_MATRIX |
Acquire operation for getWorldMatrix(). |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_NORMAL_MATRIX |
Acquire operation for getNormalMatrix(). |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CAMERA_POSITION |
Acquire operation for getCameraPosition(). |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_AMBIENT |
Acquire operation for getAmbient(). |
KZU_EXPRESSION_VALIDATOR_OPERATION_TERNARY_CONDITIONAL |
Ternary conditional (select) operation. |
KZU_EXPRESSION_VALIDATOR_OPERATION_LINEAR_TO_SRGB |
Linear to sRGB color conversion operation. |
KZU_EXPRESSION_VALIDATOR_OPERATION_SRGB_TO_LINEAR |
Linear to sRGB color conversion operation. |
KZU_EXPRESSION_VALIDATOR_OPERATION_TRANSPOSE |
Transpose a matrix. |
KZU_EXPRESSION_VALIDATOR_OPERATION_PREMULTIPLY_COLOR | |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_VIEW_POSITION |
Acquire operation for getViewPosition(). |
KZU_EXPRESSION_VALIDATOR_OPERATION_SPLIT |
Split input into a range. |
KZU_EXPRESSION_VALIDATOR_OPERATION_EVALUATE |
Evaluate register contents. |
KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ITERATOR |
Create iterator. |
KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_VIEW |
Create iterator. |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_COLOR4 |
Converts to Color: color(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_VECTOR2 |
Converts to Color: color(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_VECTOR3 |
Converts to Color: color(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TO_VECTOR4 |
Converts to Color: color(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_WIDTH |
Gets the width of a texture: textureGetWidth(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_HEIGHT |
Gets the height of a texture: textureGetHeight(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_SIZE |
Gets the size of a texture: textureGetSize(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_PIXEL_FORMAT |
Gets the pixel format of a texture: textureGetPixelFormat(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_ADDRESSING_MODE |
Gets the addressing mode of a texture: textureGetAddressingMode(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_DEPTH_COMPARE_FUNCTION |
Gets the depth compare function of a texture: textureGetDepthCompareFunction(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_FILTER_MODE |
Gets the filter mode of a texture: textureGetFilterMode(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_MIPMAP_MODE |
Gets the mipmap mode of a texture: textureGetMipmapMode(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_ANISOTROPY_LEVEL |
Gets the anisotropy level of a texture: textureGetAnisotropyLevel(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_MULTISAMPLE_LEVEL |
Gets the multisample level of a texture: textureGetMultisampleLevel(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_NOT |
Inverts the bits of the binary representation of an integer: ~param1. |
KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_AND |
Performs the logical AND operation on each pair of the corresponding bits of the binary representations of two integers: param1 & param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_OR |
Performs the logical OR operation on each pair of the corresponding bits of the binary representations of two integers: param1 | param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_XOR |
Performs the logical exclusive or (XOR) operation on each pair of the corresponding bits of the binary representations of two integers: param1 ^ param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_LEFT_SHIFT |
Shifts the bits in the binary representation of an integer (param1) to the left by a given number of positions (param2): param1 << param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_RIGHT_SHIFT |
Shifts the bits in the binary representation of an integer (param1) to the right by a given number of positions (param2): param1 >> param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_HSL_TO_SRGB |
Converts an HSL color to SRGB. |
KZU_EXPRESSION_VALIDATOR_OPERATION_SRGB_TO_HSL |
Converts an SRGB color to HSL. |
KZU_EXPRESSION_VALIDATOR_OPERATION_SIGN |
Returns the sign of a number: sign(param1) |
KZU_EXPRESSION_VALIDATOR_OPERATION_LENGTH |
Returns the length of a vector: length(vector) |
KZU_EXPRESSION_VALIDATOR_OPERATION_NORMALIZE |
Normalizes a vector: normalize(vector) |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_ROW |
Returns a row vector in a matrix: getRow(matrix, index) |
KZU_EXPRESSION_VALIDATOR_OPERATION_SET_ROW |
Sets a row vector in a matrix: setRow(matrix, index, vector) |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_COLUMN |
Gets a column vector in a matrix: getColumn(matrix, index) |
KZU_EXPRESSION_VALIDATOR_OPERATION_SET_COLUMN |
Sets a column vector in a matrix: setColumn(matrix, index, vector) |
KZU_EXPRESSION_VALIDATOR_OPERATION_CONTINUE_IF |
Stops executing a binding when the input parameter evaluates to false: continueIf(param1)
|
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CAMERA_NORMAL_MATRIX |
Acquire operation for getCameraNormalMatrix().
|
KZU_EXPRESSION_VALIDATOR_OPERATION_STRING_FORMAT |
Calls the string formatting function with a format string from (param1) and format arguments from the range parameter (param2): stringFormat("foo: {}, bar: {}", ValueRange("baz", 3)) -> ("foo: baz, bar: 3"). |
KZU_EXPRESSION_VALIDATOR_OPERATION_APPEND_RANGE |
Adds one item (param1) to a value range (param0): appendRange(ValueRange(1,2,3), 4) -> ValueRange(1,2,3,4) Ignores input ranges that are not a ValueRange: appendRange(SplitStringRange("1,2,3", ","), 4) -> ValueRange(4) Accepts null ValueRanges: appendRange(nullptr, 5) -> ValueRange(5) |
KZU_EXPRESSION_VALIDATOR_OPERATION_POSITION_CONSTRAINT |
Locks position component of SRT3D transformation param1 to position component of param2. Values beyond this point are NOT shared in the binary format and are unknown to Studio, only being internal to the engine. |
KZU_EXPRESSION_VALIDATOR_OPERATION_ORIENTATION_CONSTRAINT |
Locks rotation component of SRT3D transformation param1 to position component of param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_LOOK_AT_CONSTRAINT |
Orients SRT3D transformation in param1 to look at position specified by param2. |
KZU_EXPRESSION_VALIDATOR_OPERATION_REVERSED_LOOK_AT_CONSTRAINT |
Orients SRT3D transformation in param2 to look at position specified by param1. |
KZU_EXPRESSION_VALIDATOR_OPERATION_REVERSED_CYLINDRICAL_LOOK_AT_CONSTRAINT |
Orients SRT3D transformation in param2 to look at position specified by param1. The orientation is calculated in cylindrical fashion. Up vector always points to positive Y axis. |
KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR |
Processor operator is a special case. The OpCode refers to index of an expression processor, which points to a different array than the regular binding processors. To get the referred processor index from the operation code, subtract the base value. |
KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_0 |
Convenience identifier for first operation processor. |
KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_1 |
Convenience identifier for second operation processor. |
KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_2 |
Convenience identifier for third operation processor. |
KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_3 |
Convenience identifier for fourth operation processor. |
KZU_EXPRESSION_VALIDATOR_OPERATION_INVALID |
Invalid operation for placeholder purposes.
|
bool kanzi::variantSetToDataObject | ( | const Variant & | value, |
DataObject & | dataObject | ||
) |
Sets variant value to a data object.
value | Variant to set. |
dataObject | Target data object. |
BindingLoadInfo kanzi::loadBinding | ( | KzbFile & | kzbFile, |
KzbMemoryParser & | parser | ||
) |
Loads a binding from a kzb file.
kzbFile | The kzb file from which to load a binding. |
parser | The parser from which to read a binding. |
void kanzi::loadBindings | ( | KzbFile & | kzbFile, |
KzbMemoryParser & | parser, | ||
vector< BindingLoadInfo > & | bindings | ||
) |
Loads bindings from a kzb file.
kzbFile | The kzb file from which to load bindings. |
parser | The parser from which to read bindings. |
bindings | The Bindings container where the loaded bindings are stored. |
bool kanzi::expressionOperationWrite | ( | BindingExpressionOpCodeParameters & | params | ) |
Execute write operation.
This operation is separate from all regular operations to allow it to be executed directly as part of other bindings. Write operation is allowed to skip some phases of operation execution, improving performance.
params | Parameters for write. |
string kanzi::getExpressionOperationName | ( | KzuExpressionValidatorOperation | operation | ) |
Gets a string representation of an expression validator operator.
operation | Operation code. |
BindingExpressionFunction kanzi::bindingExpressionFunctionFromOperation | ( | KzuExpressionValidatorOperation | operation | ) |
Converts expression validation operation to a binding expression function.
operation | Operation id. |
int kanzi::bindingExpressionDivide | ( | int | lhs, |
int | rhs | ||
) |
Integer divide the expression way.
Zero divisor results in value 0.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
float kanzi::bindingExpressionDivide | ( | float | lhs, |
float | rhs | ||
) |
Floating point divide the expression way.
Zero divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Color divide the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Vector2 divide the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Vector3 divide the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Vector4 divide the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
int kanzi::bindingExpressionRemainder | ( | int | lhs, |
int | rhs | ||
) |
Integer remainder the expression way.
Zero divisor results in value 0.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
float kanzi::bindingExpressionRemainder | ( | float | lhs, |
float | rhs | ||
) |
Floating point remainder the expression way.
Zero divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Color remainder the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Vector2 remainder the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Vector3 remainder the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Vector4 remainder the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
int kanzi::bindingExpressionModulo | ( | int | lhs, |
int | rhs | ||
) |
Integer modulo the expression way.
Zero divisor results in value 0.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
float kanzi::bindingExpressionModulo | ( | float | lhs, |
float | rhs | ||
) |
Floating point modulo the expression way.
Zero divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Color modulo the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Vector2 modulo the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Vector3 modulo the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
Vector4 modulo the expression way.
Zero component divisor results in value 0.0f.
lhs | Left-hand side operand (dividend). |
rhs | Right-hand side operand (divisor). |
PropertyField kanzi::propertyFieldFromBinaryTargetAttribute | ( | KzuPropertyBinaryTargetAttribute | attribute | ) |
Converts a property target attribute from binary into a property field.
attribute | Binary target attribute read from a file. |
bool kanzi::isFixedOperationOpCode | ( | KzuExpressionValidatorOperation | opCode | ) |
Tells if given operation code corresponds with a fixed operation.
opCode | Operation code to check. |
Matrix4x4 kanzi::bindingFixedOperationGetProjectionCameraWorldMatrix | ( | RenderPass & | renderPass, |
Node & | node | ||
) |
Fixed operation to acquire projection camera world matrix.
This fixed operation is exposed for use in fixed uniform functions.
renderPass | Render pass for this context. |
node | Node for this context. |
Matrix4x4 kanzi::bindingFixedOperationGetCameraWorldMatrix | ( | RenderPass & | renderPass, |
Node & | node | ||
) |
Fixed operation to acquire camera world matrix.
This fixed operation is exposed for use in fixed uniform functions.
renderPass | Render pass for this context. |
node | Node for this context. |
Matrix4x4 kanzi::bindingFixedOperationGetWorldMatrix | ( | Node & | node | ) |
Matrix4x4 kanzi::bindingFixedOperationGetNormalMatrix | ( | Node & | node | ) |
Fixed operation to acquire normal matrix.
This fixed operation is exposed for use in fixed uniform functions.
node | Node for this context. |
Matrix4x4 kanzi::bindingFixedOperationGetCameraNormalMatrix | ( | RenderPass & | renderPass, |
Node & | node | ||
) |
Fixed operation to acquire camera normal matrix.
This fixed operation is exposed for use in fixed uniform functions.
renderPass | Render pass for this context. |
node | Node for this context. |
Vector3 kanzi::bindingFixedOperationGetCameraPosition | ( | RenderPass & | renderPass | ) |
Fixed operation to acquire camera position vector.
This fixed operation is exposed for use in fixed uniform functions.
renderPass | Render pass for this context. |
Vector4 kanzi::bindingFixedOperationGetViewPosition | ( | RenderPass & | renderPass | ) |
Fixed operation to acquire homogeneous view position vector.
This fixed operation is exposed for use in fixed uniform functions.
renderPass | Render pass for this context. |
Quaternion kanzi::getQuaternionField | ( | const Variant & | variant, |
PropertyField | field | ||
) |
Gets a quaternion field from a variant.
variant | Variant from which to extract. |
field | Field to extract. |
void kanzi::extractExpressionField | ( | Variant & | outputRegister, |
const Variant & | inputRegister, | ||
PropertyField | field | ||
) |
Reads a field from an input register and writes it to the output register.
outputRegister | Output register to which to write. |
inputRegister | Input register from which to read. |
field | Field to read. |