matrix_transform_vertex

This function transforms a vector by a matrix. You supply the transform matrix ID (as returned by the function matrix build()), as well as the x, y and z values for the vector to transform. The function will return an array of 3 elements where:

 

Syntax:

matrix_transform_vertex(matrix, x, y, z);

ArgumentType Description
matrixMatrix Array The matrix to use
xReal The x component of the transform vector
yReal The y component of the transform vector
zReal The z component of the transform vector

 

Returns:

Array (3 elements)

 

Example:

t_matrix = matrix_build(0, 0, 0, 0, 90, 0, 1, 2, 1);
verts = matrix_transform_vertex(t_matrix, x, y, z);

The above code transforms the given values using the matrix stored in the variable "t_matrix" and stores them in the array "verts".