A structure that describes the scale, rotation and translation transformation in 3D space. More...
Public Member Functions | |
SRTValue3D () | |
Default constructor. | |
SRTValue3D (Vector3 scale, Quaternion rotation, Vector3 translation) | |
Constructor with the supplied scale, rotation as a quaternion, and translation. | |
SRTValue3D (Vector3 scale, Vector3 eulerAnglesInRadians, Vector3 translation) | |
Constructor with the supplied scale, rotation angle, and translation. | |
synchronized void | delete () |
boolean | equals (Object obj) |
Indicates whether some other object is "equal to" this one. | |
Quaternion | getRotation () |
Returns the rotation as a quaternion. | |
Vector3 | getScale () |
Returns the scale. | |
float | getScaleX () |
Returns the scale along the x-axis. | |
float | getScaleY () |
Returns the scale along the y-axis. | |
float | getScaleZ () |
Returns the scale along the z-axis. | |
Vector3 | getTranslation () |
Returns the translation. | |
float | getTranslationX () |
Returns the translation along the x-axis. | |
float | getTranslationY () |
Returns the translation along the y-axis. | |
float | getTranslationZ () |
Returns the translation along the z-axis. | |
int | hashCode () |
Returns a hash code value for the object. | |
void | rotate (Quaternion rotation) |
Applies a rotation to the current rotation. | |
SRTValue3D | rotated (Quaternion rotation) |
Rotates the SRT object. | |
void | scale (Vector3 factor) |
Multiplies the current scale with the provided scaling factor. | |
SRTValue3D | scaled (Vector3 scale) |
Scales the SRT object. | |
void | setRotation (Quaternion value) |
Sets the rotation. | |
void | setRotation (Vector3 eulerAnglesInRadians) |
Sets the rotation. | |
void | setScale (Vector3 value) |
Sets the scale. | |
void | setScaleX (float value) |
Sets the scale along the x-axis. | |
void | setScaleY (float value) |
Sets the scale along the y-axis. | |
void | setScaleZ (float value) |
Sets the scale along the z-axis. | |
void | setTranslation (Vector3 value) |
Sets the translation. | |
void | setTranslationX (float value) |
Sets the translation along the x-axis. | |
void | setTranslationY (float value) |
Sets the translation along the y-axis. | |
void | setTranslationZ (float value) |
Sets the translation along the z-axis. | |
Matrix4x4 | toMatrix () |
Converts the SRT representation to Matrix4x4 transform. | |
void | translate (Vector3 translation) |
Adds the provided translation to the current translation. | |
SRTValue3D | translated (Vector3 translation) |
Translates the SRT object. | |
Static Public Member Functions | |
static SRTValue3D | create (Matrix4x4 matrix) |
Attempts to create a SRT object from a given transformation 4x4 matrix. | |
static SRTValue3D | createScale (Vector3 scale) |
Creates a scale SRT. | |
static SRTValue3D | createTranslation (Vector3 translation) |
Creates a translation SRT. | |
static SRTValue3D | createUniformScale (float scale) |
Creates a uniform scale SRT. | |
Protected Member Functions | |
void | finalize () |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | |
Protected Attributes | |
transient boolean | swigCMemOwn |
Does this object own its native object. | |
A structure that describes the scale, rotation and translation transformation in 3D space.
Rotation is stored as quaternion, with the angle in radians.
SRTValue3D | ( | Vector3 | scale, |
Vector3 | eulerAnglesInRadians, | ||
Vector3 | translation ) |
Constructor with the supplied scale, rotation angle, and translation.
scale | The scale. |
eulerAnglesInRadians | The rotation in Euler angles (radians). |
translation | The translation. |
SRTValue3D | ( | Vector3 | scale, |
Quaternion | rotation, | ||
Vector3 | translation ) |
Constructor with the supplied scale, rotation as a quaternion, and translation.
scale | The scale. |
rotation | The rotation. |
translation | The translation. |
|
static |
Attempts to create a SRT object from a given transformation 4x4 matrix.
Note: A matrix is decomposable into SRT if its column vectors are orthogonal to each other.
matrix | The transformation 4x4 matrix. |
|
static |
Creates a scale SRT.
scale | The scale. |
|
static |
Creates a translation SRT.
translation | The translation. |
|
static |
Creates a uniform scale SRT.
scale | The scale. |
boolean equals | ( | Object | obj | ) |
Indicates whether some other object is "equal to" this one.
obj | The reference object with which to compare. |
|
protected |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
Finalization is deprecated and subject to removal in future.
Quaternion getRotation | ( | ) |
Returns the rotation as a quaternion.
Vector3 getScale | ( | ) |
Returns the scale.
float getScaleX | ( | ) |
Returns the scale along the x-axis.
float getScaleY | ( | ) |
Returns the scale along the y-axis.
float getScaleZ | ( | ) |
Returns the scale along the z-axis.
Vector3 getTranslation | ( | ) |
Returns the translation.
float getTranslationX | ( | ) |
Returns the translation along the x-axis.
float getTranslationY | ( | ) |
Returns the translation along the y-axis.
float getTranslationZ | ( | ) |
Returns the translation along the z-axis.
int hashCode | ( | ) |
Returns a hash code value for the object.
void rotate | ( | Quaternion | rotation | ) |
Applies a rotation to the current rotation.
rotation | Rotation quaternion. |
SRTValue3D rotated | ( | Quaternion | rotation | ) |
Rotates the SRT object.
rotation | The rotation. |
Multiplies the current scale with the provided scaling factor.
factor | The scaling factor. |
SRTValue3D scaled | ( | Vector3 | scale | ) |
Scales the SRT object.
scale | The scaling factor. |
void setRotation | ( | Quaternion | value | ) |
Sets the rotation.
value | Rotation as a quaternion. |
Sets the rotation.
eulerAnglesInRadians | Rotation angle as Euler angle in radians. |
Sets the scale along the x-axis.
value | The x component of the scale. |
Sets the scale along the y-axis.
value | The y component of the scale. |
Sets the scale along the z-axis.
value | The z component of the scale. |
Sets the translation along the x-axis.
value | The x component of the translation. |
Sets the translation along the y-axis.
value | The y component of the translation. |
Sets the translation along the z-axis.
value | The z component of the translation. |
Matrix4x4 toMatrix | ( | ) |
Converts the SRT representation to Matrix4x4 transform.
Adds the provided translation to the current translation.
translation | The translation term. |
SRTValue3D translated | ( | Vector3 | translation | ) |
Translates the SRT object.
translation | The translation term. |