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:
matrix_transform_vertex(matrix, x, y, z);
| Argument | Type | Description |
|---|---|---|
| matrix | Matrix Array | The matrix to use |
| x | Real | The x component of the transform vector |
| y | Real | The y component of the transform vector |
| z | Real | The z component of the transform vector |
Array (3 elements)
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".