AffineTransform

abstract class AffineTransform

Represents an Affine Transformation that supports 3D.

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val inverse: AffineTransform?
Link copied to clipboard

true if this transform is equal to the Identity transform

Link copied to clipboard

Scale component in the x direction

Link copied to clipboard

Scale component in the y direction

Link copied to clipboard

Scale component in the z direction

Link copied to clipboard

Shear component in the x direction

Link copied to clipboard

Shear component in the x direction with z unchanged

Link copied to clipboard

Shear component in the x direction with y unchanged

Link copied to clipboard

Shear component in the y direction

Link copied to clipboard

Shear component in the y direction with z unchanged

Link copied to clipboard

Shear component in the y direction with y unchanged

Link copied to clipboard

Shear component in the z direction with x unchanged

Link copied to clipboard

Shear component in the z direction with y unchanged

Link copied to clipboard

Translation component in the x direction

Link copied to clipboard

Translation component in the y direction

Link copied to clipboard

Translation component in the z direction

Functions

Link copied to clipboard

Applies a horizontal flip operation (around the y-axis) to this transform.

Applies a horizontal flip operation to this transform.

Link copied to clipboard

Applies a vertical flip operation (around the x-axis) to this transform.

Applies a vertical flip operation to this transform.

Link copied to clipboard
operator fun invoke(polygon: ConvexPolygon): ConvexPolygon

Transforms the given polygon. Note that the resulting polygon is a 2D projection of the transformed points. That is because this transform may map the 2D points of polygon into a set of 3D points.

abstract operator fun invoke(point: Point): Vector3D
abstract fun invoke(point: Vector3D): Vector3D

Applies the transform to point. This operation treats point as a (3x1 or 4x1) Matrix (based on whether this is a 2D or 3D transform) and uses matrix multiplication to find a new 3x1 matrix to produce the result.

abstract operator fun invoke(vararg points: Vector3D): List<Vector3D>

Transforms the given points.

Link copied to clipboard
@JvmName(name = "callPoint")
inline fun AffineTransform.invoke(points: List<Point>): List<Vector3D>

Transforms the given points.

Link copied to clipboard
open infix fun rotate(by: Measure<Angle>): AffineTransform

Appends a rotation operation (around the z-axis), at the Origin to this transform.

open fun rotate(around: Point, by: Measure<Angle>): AffineTransform

Appends a rotation (around the z-axis) operation to this transform.

Link copied to clipboard
abstract infix fun rotateX(by: Measure<Angle>): AffineTransform

Appends a rotation operation (around the x-axis), at the Origin to this transform.

Appends a rotation (around the x-axis) operation to this transform.

Link copied to clipboard
abstract infix fun rotateY(by: Measure<Angle>): AffineTransform

Appends a rotation (around the y-axis) operation to this transform.

Link copied to clipboard
abstract infix fun rotateZ(by: Measure<Angle>): AffineTransform

Appends a rotation operation (around the z-axis), at the Origin to this transform.

Appends a rotation (around the z-axis) operation to this transform.

Link copied to clipboard
abstract fun scale(x: Double = 1.0, y: Double = 1.0, z: Double = 1.0): AffineTransform

Append a scale operation (around the Origin) to this transform.

fun scale(around: Point, x: Double = 1.0, y: Double = 1.0, z: Double = 1.0): AffineTransform

Append a scale operation to this transform, that scales around the given point.

fun scale(around: Vector3D, x: Double = 1.0, y: Double = 1.0, z: Double = 1.0): AffineTransform
Link copied to clipboard
abstract fun skew(x: Double = 0.0, y: Double = 0.0, z: Double = 0.0): AffineTransform

Append a skew operation to this transform.

Link copied to clipboard
abstract operator fun times(other: AffineTransform): AffineTransform

Allows transforms to be combined sequentially.

Link copied to clipboard
Link copied to clipboard
open infix fun translate(by: Point): AffineTransform
abstract fun translate(x: Double = 0.0, y: Double = 0.0, z: Double = 0.0): AffineTransform

Append a translation operation to this transform.