Skip to content
FYP edited this page Aug 9, 2017 · 1 revision

Class matrix

Static Members

matrix.new

Matrix matrix = matrix.new()
Matrix matrix = matrix.new(Matrix matrix)
Matrix matrix = matrix.new(Vector right, Vector up, Vector at, Vector pos)
Matrix matrix = matrix.new(float right_x, float right_y, float right_z, float up_x, float up_y, float up_z, float at_x, float at_y, float at_z, float pos_x, float pos_y, float pos_z)

Creates new matrix object.

matrix.from_quat

Matrix matrix = matrix.from_quat(Quaternion quat)

Creates new matrix object from quaternion.

matrix.from_memory

Matrix matrix = matrix.from_memory(uint matrix_ptr)

Members

matrix:get_pointer

uint ptr = matrix:get_pointer()

matrix:set

matrix:set(Matrix matrix)
matrix:set(Vector right, Vector up, Vector at, Vector pos)
matrix:set(float right_x, float right_y, float right_z, float up_x, float up_y, float up_z, float at_x, float at_y, float at_z, float pos_x, float pos_y, float pos_z)

matrix:set_rotation_from_quat

matrix:set_rotation_from_quat(Quaternion quat)

matrix:rotate

matrix:rotate(float x, float y, float z)

matrix:rotate_x

matrix:rotate_x(float angle)

matrix:rotate_y

matrix:rotate_y(float angle)

matrix:rotate_z

matrix:rotate_z(float angle)

matrix:rotate_around_axis

matrix:rotate_around_axis(float x, float y, float z, float angle, [int combine_op])

matrix:get_coords_with_offset

float x, float y, float z = matrix:get_coords_with_offset(float x, float y, float z)

matrix:get_relative_coords

float x, float y, float z = matrix:get_relative_coords(float x, float y, float z)

matrix:get_angles

float x, float y, float z = matrix:get_angles()

matrix:get_slerped

Matrix matrix = matrix:get_slerped(Matrix matrix, float t)

matrix.right

Vector right = matrix.right

matrix.up

Vector up = matrix.up

matrix.at

Vector at = matrix.at

matrix.pos

Vector pos = matrix.pos

matrix.flags

uint flags = matrix.flags