Go to: Synopsis. Return value. MEL examples.

Synopsis

float[] pointMatrixMult ( float $point[], float $matrix[] )

This script returns the multiplication of a point and a matrix as an array of 3 doubles:
vector * matrix = result

Note: The matrix is assumed to be a single dimension array of 16 elements.
Remember: That the arrays are 0-based. e.g. [1][0] is matrix[4] element

Return value

None

Arguments

Variable Name Variable Type Description
$pointfloat[]Co-ordinates of the point.
$matrixfloat[]The matrix to be used.

MEL examples

	float $p[] = {1,2,3};
	float $m[] = {1,0,0,0,0,2,0,0,0,0,3,0,0,0,0,0};
	pointMatrixMult($p, $m);
	// Results: 1 4 9 //