AddDimensionInfo Data Member Function

Adds the dimensions of the left operand, right operand, and result. Dimensions are in rows and columns. For example, the dimension of a vec4 and vec4 addition is another vec4. In this case you would populate the <Int32Array> with 6 values: the left operand vec4 is 1 col and 4 rows, the right operand vec4 is 1 col and 4 rows, and the result operand is 1 col and 4 rows. This means the <Int32Array> values are as follows: 1,4,1,4,1,4. When formatting rules for a matrix multiply of the form mat4 * vec4 = mat4, the values of the operands are you would populate the <Int32Array> with 4,4,1,4,4,4. In this example, the first pair 4,4 represents the left operand mat4x4, the second pair 1,4 represents the right operand vec4, and the final pair 4,4 represents the resulting mat4.

Prototype

int32 AddDimensionInfo( Int32Array p_aiDimensionInfo, int32 p_nLeftCols, int32 p_nLeftRows, int32 p_nRightCols, int32 p_nRightRows, int32 p_nResultCols, int32 p_nResultRows )

Parameters

Parameter Type Parameter Name Documentation
<Int32Array>p_aiDimensionInfoA pointer to an <Int32Array> that will store the dimension information.
int32p_nLeftColsAn <int32> representing the number of columns in the left operand.
int32p_nLeftRowsAn <int32> representing the number of rows in the left operand.
int32p_nRightColsAn <int32> representing the number of columns in the right operand.
int32p_nRightRowsAn <int32> representing the number of rows in the right operand.
int32p_nResultColsAn <int32> representing the number of columns in the expression result.
int32p_nResultRowsAn <int32> representing the number of rows in the expression result.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.