Wraps a nkMaths::Quaternion and offers functions for use in scripting.
More...
Wraps a nkMaths::Quaternion and offers functions for use in scripting.
◆ updateEnvironment()
Updates a given environment and set it up to use all functions wrapped by this wrapper.
- Parameters
-
env | The environment to set up. |
◆ constructor()
static void* nkAstraeus::nkMathsWrap::QuaternionWrapper::constructor |
( |
const nkScripts::DataStack & |
stack | ) |
|
|
static |
Wrapper function for the constructor of the user type.
local q = nkMaths.Quaternion.new() ;
- Parameters
-
stack | The parameter stack. |
- Returns
- An output value with the user type and data allocated.
◆ destructor()
static void nkAstraeus::nkMathsWrap::QuaternionWrapper::destructor |
( |
void * |
toDestroy | ) |
|
|
static |
Wrapper function for the destructor of the user type.
- Parameters
-
toDestroy | The data that has to be freed. |
◆ newQuat4()
Wrapper function for the constructor of the user type. Will map to the quaternion 4-float constructor.
local t = nkMaths.Quaternion.newQuat4(x, y, z, w) ;
- Parameters
-
stack | The parameter stack. |
- Returns
- An output value with the user type and data allocated.
◆ getX()
Wrapper function for the nkMaths::Quaternion::getX(), exposed as an attribute getter.
local d = q._x ;
- Parameters
-
vector | The data from which the attribute will be retrieved. |
- Returns
- The attribute value, as a float.
◆ getY()
Wrapper function for the nkMaths::Quaternion::getY(), exposed as an attribute getter.
local d = q._y ;
- Parameters
-
vector | The data from which the attribute will be retrieved. |
- Returns
- The attribute value, as a float.
◆ getZ()
Wrapper function for the nkMaths::Quaternion::getZ(), exposed as an attribute getter.
local d = q._z ;
- Parameters
-
vector | The data from which the attribute will be retrieved. |
- Returns
- The attribute value, as a float.
◆ getW()
Wrapper function for the nkMaths::Quaternion::getW(), exposed as an attribute getter.
local d = q._w ;
- Parameters
-
vector | The data from which the attribute will be retrieved. |
- Returns
- The attribute value, as a float.
◆ getAsEulerAngles()
Wrapper function for nkMaths::Quaterion::getAsEulerAngles().
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, as a nkMaths::Vector.
◆ setX()
Wrapper function for nkMaths::Quaternion::setX(), exposed as an attribute setter.
q._x = 0.2 ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, empty.
◆ setY()
Wrapper function for nkMaths::Quaternion::setY(), exposed as an attribute setter.
q._y = 0.2 ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, empty.
◆ setZ()
Wrapper function for nkMaths::Quaternion::setZ(), exposed as an attribute setter.
q._z = 0.2 ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, empty.
◆ setW()
Wrapper function for nkMaths::Quaternion::setW(), exposed as an attribute setter.
q._w = 0.2 ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, empty.
◆ transform()
◆ apply()
◆ setFromAxisAngle()
◆ setFromEuler()
◆ setFromOrientationMatrix()
◆ setFromTransformationMatrix()
◆ toString()
Overrides the default string conversion function.
local s = tostring(q) ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, as a string.
◆ add()
Overrides the default add operation for the user type.
local q = p + t ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, as a nkMaths::Quaternion.
◆ sub()
Overrides the default subtract operation for the user type.
local q = p - t ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, as a nkMaths::Quaternion.
◆ mul()
Overrides the default multiply operation for the user type.
local q = p * t ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, as a nkMaths::Quaternion.
◆ div()
Overrides the default divide operation for the user type.
local q = p / t ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, as a nkMaths::Quaternion.
◆ eq()
Overrides the default equality operation for the user type.
local q = p == t ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, as a bool.
The documentation for this class was generated from the following file: