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.
matrix_transform_vertex(matrix, x, y, z);
| 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 |
Array (1D, 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".