class Affine2D: AbstractAffine

Affine transformation matrix and operations in 2D.

Constructors

<init>

constructor(_matrix: JOMLMatrix4dc)

Affine transformation matrix and operations in 2D.

Parameters

Name Description
_matrix: JOMLMatrix4dc

internal matrix of adapting library

Methods

transform

fun transform(point: Vector2D): _matrix.transformPosition(point.toVector3D(0.0).toVector3DJOML()).toVector2D()

Parameters

Name Description
point: Vector2D

ReturnValue

Name Description
_matrix.transformPosition(point.toVector3D(0.0).toVector3DJOML()).toVector2D()

transform

fun transform(rotation: Rotation2D): Rotation2D

Parameters

Name Description
rotation: Rotation2D

ReturnValue

Name Description
Rotation2D

transform

fun transform(pose: Pose2D): Pose2D

Parameters

Name Description
pose: Pose2D

ReturnValue

Name Description
Pose2D

inverseTransform

fun inverseTransform(point: Vector2D): _matrixInverse.transformPosition(point.toVector3D(0.0).toVector3DJOML()).toVector2D()

Parameters

Name Description
point: Vector2D

ReturnValue

Name Description
_matrixInverse.transformPosition(point.toVector3D(0.0).toVector3DJOML()).toVector2D()

inverseTransform

fun inverseTransform(rotation: Rotation2D): Rotation2D

Parameters

Name Description
rotation: Rotation2D

ReturnValue

Name Description
Rotation2D

inverseTransform

fun inverseTransform(pose: Pose2D): Pose2D

Parameters

Name Description
pose: Pose2D

ReturnValue

Name Description
Pose2D

extractTranslation

fun extractTranslation(): ()

Extracts the translation vector of the Affine2D transformation matrix.

ReturnValue

Name Description
()

translation vector

extractScaling

fun extractScaling(): RealVector

Extracts the scale vector of the Affine2D transformation matrix. See the wikipedia article of scaling (geometry).

ReturnValue

Name Description
RealVector

scaling vector

extractRotation

fun extractRotation(): Rotation2D

Extracts the rotation of the Affine2D transformation matrix.

ReturnValue

Name Description
Rotation2D

rotation

append

fun append(other: Affine2D): Affine2D

Appends another transformation matrix.

Parameters

Name Description
other: Affine2D

transformation matrix for appending

ReturnValue

Name Description
Affine2D

new Affine2D transformation matrix

equals

fun equals(other: Any?): Boolean

Parameters

Name Description
other: Any?

ReturnValue

Name Description
Boolean

hashCode

fun hashCode(): Int

ReturnValue

Name Description
Int

toMatrix4JOML

fun toMatrix4JOML(): JOMLMatrix4d(this._matrix)

ReturnValue

Name Description
JOMLMatrix4d(this._matrix)

toMatrix

fun toMatrix(): RealMatrix

ReturnValue

Name Description
RealMatrix

toDoubleArray

fun toDoubleArray(): DoubleArray

ReturnValue

Name Description
DoubleArray

CompanionObject

Affine2D

class Affine2D: AbstractAffine

Affine transformation matrix and operations in 2D.

Fields

Name Description
val UNIT: Affine2D

UNIT transformation matrix.

Methods

of

fun of(translation: Vector2D): Affine2D

Creates an Affine2D transformation matrix from a translation vector.

Parameters

Name Description
translation: Vector2D

ReturnValue

Name Description
Affine2D

of

fun of(scaling: RealVector): Affine2D

Creates an Affine2D transformation matrix from a scaling vector.

Parameters

Name Description
scaling: RealVector

ReturnValue

Name Description
Affine2D

of

fun of(rotation: Rotation2D): Affine2D

Creates an Affine2D transformation matrix from a rotation.

Parameters

Name Description
rotation: Rotation2D

ReturnValue

Name Description
Affine2D

of

fun of(affineList: List<Affine2D>): Affine2D

Creates an Affine2D transformation matrix from a list of sequentially applied affine transformation matrices.

Parameters

Name Description
affineList: List<Affine2D>

ReturnValue

Name Description
Affine2D

of

fun of(vararg affines: Affine2D): (vararg affines: Affine2D)

Creates an Affine2D transformation matrix from a list of sequentially applied affine transformation matrices.

Parameters

Name Description
vararg affines: Affine2D

ReturnValue

Name Description
(vararg affines: Affine2D)

of

fun of(translation: Vector2D, rotation: Rotation2D): Affine2D

Creates an Affine2D transformation matrix from first applying a translation and then a rotation.

Parameters

Name Description
translation: Vector2D
rotation: Rotation2D

ReturnValue

Name Description
Affine2D

of

fun of(pose: Pose2D): Affine2D

Creates an Affine2D transformation matrix from a pose.

Parameters

Name Description
pose: Pose2D

ReturnValue

Name Description
Affine2D