KzuExpressionValidatorOperationEnums
¶
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: Operation codes from the binary use only the first byte: 0-255. Engine-only operations, e.g. constraints use 256 and the first byte: 256-511. Animation validators use 512 and the first byte: 512-767
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.
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¶ | Transpose a matrix. |
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) Since Kanzi 3.9.5 |
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CAMERA_NORMAL_MATRIX¶ | Acquire operation for getCameraNormalMatrix(). Since Kanzi 3.9.6 |
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. Since Kanzi 3.9.6 |