AffineTransform

Description

struct Tinman.Terrain.Util.AffineTransform

Represents an affine transformation matrix that is decomposable into translation, rotation / reflection, and uniform scaling.

Public / Constants

Identity


public static readonly attribute Identity → (AffineTransform)

The identity transform.

Public / Constructors

AffineTransform

7 overloads


public constructor AffineTransform1 → (1)

translation in : Vec3D

The translation component of the affine transform.

Creates a new instance of AffineTransform.


public constructor AffineTransform2 → (1)

rotation in : Mat3D

The affine matrix that represents the rotation component of the affine transform.

Creates a new instance of AffineTransform.


public constructor AffineTransform3 → (1)

scaling in : float64

The uniform scale factor of the affine transform.

Creates a new instance of AffineTransform.


public constructor AffineTransform4 → (2)

translation in : Vec3D

The translation component of the affine transform.

rotation in : Mat3D

The matrix that represents the rotation / reflection component of the affine transform.

Creates a new instance of AffineTransform.


public constructor AffineTransform5 → (2)

translation in : Vec3D

The translation component of the affine transform.

scaling in : float64

The uniform scale factor of the affine transform.

Creates a new instance of AffineTransform.


public constructor AffineTransform6 → (2)

rotation in : Mat3D

The matrix that represents the rotation / reflection component of the affine transform.

scaling in : float64

The uniform scale factor of the affine transform.

Creates a new instance of AffineTransform.


public constructor AffineTransform7 → (3)

translation in : Vec3D

The translation component of the affine transform.

rotation in : Mat3D

The matrix that represents the rotation / reflection component of the affine transform.

scaling in : float64

The uniform scale factor of the affine transform.

Creates a new instance of AffineTransform.

FromMatrix


[Pure]
public static method FromMatrix → (1)

matrix in : Mat4D

The matrix for which to create an affine transform.

returns → AffineTransform

The affine transform.

Creates a new instance of AffineTransform.

Public / Methods

Append


[Pure]
public method Append → (1)

transform in : AffineTransform

The affine transform to append.

returns → AffineTransform

The resulting affine transform, which applies this affine transform first and the given transform in afterwards. This is opposite to matrix multiplication.

Appends the given affine transform to this one.

EqualsAlmost


[Pure]
public method EqualsAlmost → (1)

other in : AffineTransform

The other transform.

returns → bool

true if both transforms are similar, false if they are not.

Checks if this transform and the given one are similar but necessarily equal.

See also

Maths.Similar2

Scale


[Pure]
public method Scale → (1)

factor in : float64

The scale factor to apply.

returns → AffineTransform

The resulting affine transform.

Multiplies the scaling component of this affine transform with the given factor.

ToMatrix


[Pure]
public method ToMatrix → (1)

inverse opt : bool = false

Apply the inverse transformation?

returns → Mat4D

The matrix.

Converts this affine transform into a matrix.

TransformBox


[Pure]
public method TransformBox → (2)

box in : Box3D

The axis-aligned bounding box.

inverse opt : bool = false

Apply the inverse transformation?

returns → Box3D

The transformed axis-aligned bounding box.

Transforms the given axis-aligned bounding box.

TransformPoint

2 overloads


[Pure]
public method TransformPoint1 → (2)

point in : Vec3D

The point.

inverse opt : bool = false

Apply the inverse transformation?

returns → Vec3D

The transformed point.

Transforms the given point.


[Pure]
public method TransformPoint2 → (4)

in : float64

X-coordinate of the point.

in : float64

Y-coordinate of the point.

in : float64

Z-coordinate of the point.

inverse opt : bool = false

Apply the inverse transformation?

returns → Vec3D

The transformed point.

Transforms the given point.

TransformRay


[Pure]
public method TransformRay → (2)

ray in : Ray

The ray.

inverse opt : bool = false

Apply the inverse transformation?

returns → Ray

The transformed ray.

Transforms the given ray.

TransformScalar


[Pure]
public method TransformScalar → (2)

in : float64

The scalar value.

inverse opt : bool = false

Apply the inverse transformation?

returns → float64

The transformed scalar.

Transforms the given scalar.

TransformSphere


[Pure]
public method TransformSphere → (2)

sphere in : Sphere

The bounding sphere.

inverse opt : bool = false

Apply the inverse transformation?

returns → Sphere

The transformed bounding sphere box.

Transforms the given bounding sphere.

TransformVector

2 overloads


[Pure]
public method TransformVector1 → (2)

vector in : Vec3D

The vector.

inverse opt : bool = false

Apply the inverse transformation?

returns → Vec3D

The transformed vector.

Transforms the given vector.


[Pure]
public method TransformVector2 → (4)

in : float64

X-component of the vector.

in : float64

Y-component of the vector.

in : float64

Z-component of the vector.

inverse opt : bool = false

Apply the inverse transformation?

returns → Vec3D

The transformed vector.

Transforms the given vector.

Public / Attributes

Rotation


public readonly attribute Rotation → (Mat3D)

The orthonormal matrix that represents the rotation / reflection component of the transform.

Scaling


public readonly attribute Scaling → (float64)

The uniform scale factor of the transform.

Translation


public readonly attribute Translation → (Vec3D)

The translation component of the transform.