Kanzi Java API
SRTValue2D Class Reference

Structure describing scale, rotation and translation transformation in 2D space. More...

Public Member Functions

 SRTValue2D (long cPtr, boolean cMemoryOwn)
 
 SRTValue2D ()
 Default constructor.
 
 SRTValue2D (Vector2 scale, float rotationInRadians, Vector2 translation)
 Constructor with supplied scale, rotation and translation.
 
synchronized void delete ()
 
boolean equals (Object obj)
 
float getRotation ()
 Returns rotation. More...
 
Vector2 getScale ()
 Returns the scale.
 
float getScaleX ()
 Returns scale along X.
 
float getScaleY ()
 Returns scale along Y.
 
Vector2 getTranslation ()
 Returns translation.
 
float getTranslationX ()
 Returns translation along X.
 
float getTranslationY ()
 Returns translation along Y.
 
void rotate (float rotationInRadians)
 Applies rotation. More...
 
void scale (Vector2 factor)
 Applies scale factor. More...
 
void setRotation (float rotationInRadians)
 Sets rotation. More...
 
void setScale (Vector2 value)
 Sets the scale.
 
void setScaleX (float value)
 Sets scale along X.
 
void setScaleY (float value)
 Sets scale along Y.
 
void setTranslation (Vector2 value)
 Sets translation.
 
void setTranslationX (float value)
 Sets translation along X.
 
void setTranslationY (float value)
 Sets translation along Y.
 
Matrix3x3 toMatrix ()
 Converts the SRT representation to Matrix3x3 transform.
 
void translate (Vector2 translation)
 Applies translation. More...
 
void uniformScale (float factor)
 Applies uniform scale factor. More...
 

Static Public Member Functions

static SRTValue2D create (Matrix3x3 matrix)
 Attempts to create a SRT object from a given transformation 3x3 matrix. More...
 
static SRTValue2D createRotation (float rotationInRadians)
 Creates a rotation SRT. More...
 
static SRTValue2D createScale (Vector2 scale)
 Creates a scale SRT.
 
static SRTValue2D createTranslation (Vector2 translation)
 Creates a translation SRT.
 
static long getCPtr (SRTValue2D obj)
 

Protected Member Functions

void finalize ()
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

Structure describing scale, rotation and translation transformation in 2D space.


Rotation is stored as angle in radians.

Member Function Documentation

static SRTValue2D create ( Matrix3x3  matrix)
static

Attempts to create a SRT object from a given transformation 3x3 matrix.

Note: A matrix is decomposable into SRT if its column vectors are orthogonal to each other.

Parameters
matrixThe transformation 3x3 matrix.
Returns
A SRTValue3D object if the matrix is decomposable, null otherwise.
static SRTValue2D createRotation ( float  rotationInRadians)
static

Creates a rotation SRT.


Rotation is angle in radians.

float getRotation ( )

Returns rotation.


Rotation is angle in radians.

void rotate ( float  rotationInRadians)

Applies rotation.


Provided angle is added.
Rotation is angle in radians.

void scale ( Vector2  factor)

Applies scale factor.


Multiplies current scale with provided factor.

void setRotation ( float  rotationInRadians)

Sets rotation.


Rotation is angle in radians.

void translate ( Vector2  translation)

Applies translation.


Adds provided translation to existing translation.

void uniformScale ( float  factor)

Applies uniform scale factor.


Multiplies current scale with provided factor.