Skip to content
FYP edited this page Aug 9, 2017 · 3 revisions

Class quaternion

Static Members

quaternion.new

Quaternion quat = quaternion.new()
Quaternion quat = quaternion.new(Quaternion quat)
Quaternion quat = quaternion.new(Vector vec, float w)
Quaternion quat = quaternion.new(float x, float y, float z, float w)
Quaternion quat = quaternion.new(Matrix matrix)

Creates new quaternion object.

quat.from_euler

Quaternion quat = quat.from_euler(float x, float y, float z)

Creates new quaternion object from the Euler angles.

quaternion.from_memory

Quaternion quat = quaternion.from_memory(uint quat_ptr)

Members

quat:get_pointer

uint ptr = quat:get_pointer()

quat:set

quat:set(Quaternion quat)
quat:set(Vector vec, float w)
quat:set(float x, float y, float z, float w)
quat:set(Matrix matrix)

quat:get

float x, float y, float z, float w = quat:get()

quat:rotate

quat:rotate(float x, float y, float z, float angle, [int combine_op])

quat:normalize

quat:normalize()

quat:get_normalized

Quaternion quat = quat:get_normalized()

quat:get_slerped

Quaternion quat = quat:get_slerped(Quaternion quat, float t)

quat:get_euler

float x, float y, float z = quat:get_euler()

quat.x

float x = quat.x

quat.y

float y = quat.y

quat.z

float z = quat.z

quat.w

float w = quat.w

Enums

op_combine_type

  • REPLACE
  • PRE_CONCAT
  • POST_CONCAT