8.3. VC Operator References

The table below details the operators currently implemented in VC. The following expression is an example of vector/matrix product computation.

Equation 8-3. Expression with a Vector/Matrix Product

({@Mesh_ID3:relativePhysLoc} * inv({@rotationz Mesh_ID3:matrix}) )

OperationSignArg1Arg2Return
addition+FLOAT or INTFLOAT or INTFLOAT
substraction-FLOAT or INTFLOAT or INTFLOAT
multiplication*FLOAT or INTFLOAT or INTFLOAT
division/FLOAT or INTFLOAT or INTFLOAT
modulus (remainder of int. division)%INTINTINT
matrix/table multiplication*FLOAT or INT 4x4-MATRIX or 16-TABLEFLOAT or INT 3-TABLEFLOAT or INT 3-TABLE
homogeneous matrix/table multiplication*FLOAT or INT 4x4-MATRIX or 16-TABLEFLOAT or INT 4-TABLEFLOAT or INT 4-TABLE
table/matrix multiplication*FLOAT or INT 3-TABLEFLOAT or INT 4x4-MATRIX or 16-TABLEFLOAT or INT 3-TABLE
homogeneous table/matrix multiplication*FLOAT or INT 4-TABLEFLOAT or INT 4x4-MATRIX or 16-TABLEFLOAT or INT 4-TABLE
matrix/matrix multiplication*FLOAT or INT 4x4-MATRIX or 16-TABLEFLOAT or INT 4x4-MATRIX or 16-TABLEFLOAT or INT 4x4-MATRIX or 16-TABLE

The * operator can be used to compute the product of a 4x4 matrix (or a 16 element table) by a 3D table (a vector in cartesian coordinates) or the product of a 3D table by a 4x4 matrix. The output is stored in a 3D table. The * operator can also be applied to vectors with homogenous coordinates: it uses 4D tables that represent points or vectors in homogenous coordinates and stores the results in 4D tables.