QuaternionBox - stingray.QuaternionBox object reference - Stingray Lua API Reference
A "box" that stores a Quaternion object across multiple frames.
Normally, quaternions are temporary objects that can only be safely used within a single frame. When you need a quaternion value
to persist across multiple frames, you can call QuaternionBox.store() to store the quaternion in a QuaternionBox, and
QuaternionBox.unbox() to retrieve the stored values.
For more information, see Object Lifetimes and Userdata Binding.
|
Stores the specified quaternion values in the box.
|
Parameters Returns | This function does not return any values. |
|
store ( self, x, y, z, w )
Stores the specified quaternion values in the box.
|
Parameters self : | stingray.QuaternionBox |
Specifies the object instance that this function will act on.
|
x : | number |
The X component value to store in the box.
|
y : | number |
The Y component value to store in the box.
|
z : | number |
The Z component value to store in the box.
|
w : | number |
The W component value to store in the box.
|
Returns | This function does not return any values. |
|
unbox ( self ) : stingray.Quaternion
Retrieves the quaternion last stored in the specified box.
|