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::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 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... | |
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... | |
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.
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. |
BindingExpressionFunction kanzi::bindingExpressionFunctionFromOperation | ( | KzuExpressionValidatorOperation | operation | ) |
Converts expression validation operation to 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. |
Fixed operation to acquire normal matrix.
This fixed operation is exposed for use in fixed uniform functions.
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. |