matrix_transform_vertex


Description

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 a 1D array of 3 elements where array[0] = x, array[1] = y, array[2] = z.


Syntax:

matrix_transform_vertex(matrix, x, y, z);


Arguments:

Argument Description
matrix The matrix to use
x The x component of the transform vector
y The y component of the transform vector
z The z component of the transform vector


Returns:

Array (1D, 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".


Back: Matrix Functions
Next: matrix_stack_is_empty
© Copyright YoYo Games Ltd. 2018 All Rights Reserved