matrix_get


Description

This function returns a 1D array of 16 values, corresponding to the given 4x4 matrix type, where row 1 is elements [0 - 3], row 2 is elements [4 -7], etc... (see the image on the main page). The available matrices are view, projection and world, for which you would use one of the following constants:

Constant Description
matrix_view The current view matrix
matrix_projection The current projection matrix
matrix_world The current world matrix


Syntax:

matrix_get(type);


Arguments:

Argument Description
type The type of matrix to get the values of (see the constants listed above)


Returns:

Array (1D, 16 elements)


Example:

v_array = matrix_get(matrix_view);

The above code will get the values of the current view matrix and populate the array "v_array" with them.


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