Kanzi  3.9.7
Java API
SRTValue3D Class Reference

A structure that describes the scale, rotation and translation transformation in 3D space. More...

Public Member Functions

 SRTValue3D (long cPtr, boolean cMemoryOwn)
 
 SRTValue3D ()
 Default constructor.
 
 SRTValue3D (Vector3 scale, Vector3 eulerAnglesInRadians, Vector3 translation)
 Constructor with the supplied scale, rotation angle, and translation. More...
 
 SRTValue3D (Vector3 scale, Quaternion rotation, Vector3 translation)
 Constructor with the supplied scale, rotation as a quaternion, and translation. More...
 
synchronized void delete ()
 
boolean equals (Object obj)
 
Quaternion getRotation ()
 Returns the rotation as a quaternion. More...
 
Vector3 getScale ()
 Returns the scale. More...
 
float getScaleX ()
 Returns the scale along the x-axis. More...
 
float getScaleY ()
 Returns the scale along the y-axis. More...
 
float getScaleZ ()
 Returns the scale along the z-axis. More...
 
Vector3 getTranslation ()
 Returns the translation. More...
 
float getTranslationX ()
 Returns the translation along the x-axis. More...
 
float getTranslationY ()
 Returns the translation along the y-axis. More...
 
float getTranslationZ ()
 Returns the translation along the z-axis. More...
 
int hashCode ()
 
void rotate (Quaternion rotation)
 Applies a rotation to the current rotation. More...
 
SRTValue3D rotated (Quaternion rotation)
 Rotates the SRT object. More...
 
void scale (Vector3 factor)
 Multiplies the current scale with the provided scaling factor. More...
 
SRTValue3D scaled (Vector3 scale)
 Scales the SRT object. More...
 
void setRotation (Quaternion value)
 Sets the rotation. More...
 
void setRotation (Vector3 eulerAnglesInRadians)
 Sets the rotation. More...
 
void setScale (Vector3 value)
 Sets the scale. More...
 
void setScaleX (float value)
 Sets the scale along the x-axis. More...
 
void setScaleY (float value)
 Sets the scale along the y-axis. More...
 
void setScaleZ (float value)
 Sets the scale along the z-axis. More...
 
void setTranslation (Vector3 value)
 Sets the translation. More...
 
void setTranslationX (float value)
 Sets the translation along the x-axis. More...
 
void setTranslationY (float value)
 Sets the translation along the y-axis. More...
 
void setTranslationZ (float value)
 Sets the translation along the z-axis. More...
 
Matrix4x4 toMatrix ()
 Converts the SRT representation to Matrix4x4 transform. More...
 
void translate (Vector3 translation)
 Adds the provided translation to the current translation. More...
 
SRTValue3D translated (Vector3 translation)
 Translates the SRT object. More...
 

Static Public Member Functions

static SRTValue3D create (Matrix4x4 matrix)
 Attempts to create a SRT object from a given transformation 4x4 matrix. More...
 
static SRTValue3D createScale (Vector3 scale)
 Creates a scale SRT. More...
 
static SRTValue3D createTranslation (Vector3 translation)
 Creates a translation SRT. More...
 
static SRTValue3D createUniformScale (float scale)
 Creates a uniform scale SRT. More...
 
static long getCPtr (SRTValue3D obj)
 
static long swigRelease (SRTValue3D obj)
 

Protected Member Functions

void finalize ()
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

A structure that describes the scale, rotation and translation transformation in 3D space.


Rotation is stored as quaternion, with the angle in radians.

Constructor & Destructor Documentation

SRTValue3D ( Vector3  scale,
Vector3  eulerAnglesInRadians,
Vector3  translation 
)

Constructor with the supplied scale, rotation angle, and translation.


Parameters
scaleThe scale.
eulerAnglesInRadiansThe rotation in Euler angles (radians).
translationThe translation.
SRTValue3D ( Vector3  scale,
Quaternion  rotation,
Vector3  translation 
)

Constructor with the supplied scale, rotation as a quaternion, and translation.


Parameters
scaleThe scale.
rotationThe rotation.
translationThe translation.

Member Function Documentation

static SRTValue3D create ( Matrix4x4  matrix)
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.

Parameters
matrixThe transformation 4x4 matrix.
Returns
A SRTValue3D object if the matrix is decomposable, null otherwise.
static SRTValue3D createScale ( Vector3  scale)
static

Creates a scale SRT.


Parameters
scaleThe scale.
Returns
An SRT object with scale.
static SRTValue3D createTranslation ( Vector3  translation)
static

Creates a translation SRT.


Parameters
translationThe translation.
Returns
An SRT object with translation.
static SRTValue3D createUniformScale ( float  scale)
static

Creates a uniform scale SRT.


Parameters
scaleThe scale.
Returns
An SRT object with scale.
Quaternion getRotation ( )

Returns the rotation as a quaternion.


Returns
The rotation.
Vector3 getScale ( )

Returns the scale.


Returns
The scale.
float getScaleX ( )

Returns the scale along the x-axis.


Returns
The x component of the scale.
float getScaleY ( )

Returns the scale along the y-axis.


Returns
The y component of the scale.
float getScaleZ ( )

Returns the scale along the z-axis.


Returns
The z component of the scale.
Vector3 getTranslation ( )

Returns the translation.


Returns
The translation.
float getTranslationX ( )

Returns the translation along the x-axis.


Returns
The x component of the translation.
float getTranslationY ( )

Returns the translation along the y-axis.


Returns
The y component of the translation.
float getTranslationZ ( )

Returns the translation along the z-axis.


Returns
The z component of the translation.
void rotate ( Quaternion  rotation)

Applies a rotation to the current rotation.


Parameters
rotationRotation quaternion.
SRTValue3D rotated ( Quaternion  rotation)

Rotates the SRT object.


Parameters
rotationThe rotation.
Returns
A new SRT object with the rotation applied.
void scale ( Vector3  factor)

Multiplies the current scale with the provided scaling factor.


Parameters
factorThe scaling factor.
SRTValue3D scaled ( Vector3  scale)

Scales the SRT object.


Parameters
scaleThe scaling factor.
Returns
A new SRT object with the scale applied.
void setRotation ( Quaternion  value)

Sets the rotation.


Parameters
valueRotation as a quaternion.
void setRotation ( Vector3  eulerAnglesInRadians)

Sets the rotation.


Parameters
eulerAnglesInRadiansRotation angle as Euler angle in radians.
void setScale ( Vector3  value)

Sets the scale.


Parameters
valueThe scale.
void setScaleX ( float  value)

Sets the scale along the x-axis.


Parameters
valueThe x component of the scale.
void setScaleY ( float  value)

Sets the scale along the y-axis.


Parameters
valueThe y component of the scale.
void setScaleZ ( float  value)

Sets the scale along the z-axis.


Parameters
valueThe z component of the scale.
void setTranslation ( Vector3  value)

Sets the translation.


Parameters
valueThe translation.
void setTranslationX ( float  value)

Sets the translation along the x-axis.


Parameters
valueThe x component of the translation.
void setTranslationY ( float  value)

Sets the translation along the y-axis.


Parameters
valueThe y component of the translation.
void setTranslationZ ( float  value)

Sets the translation along the z-axis.


Parameters
valueThe z component of the translation.
Matrix4x4 toMatrix ( )

Converts the SRT representation to Matrix4x4 transform.


Returns
A matrix representation of the SRT object.
void translate ( Vector3  translation)

Adds the provided translation to the current translation.


Parameters
translationThe translation term.
SRTValue3D translated ( Vector3  translation)

Translates the SRT object.


Parameters
translationThe translation term.
Returns
A new SRT object with the translation applied.