TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

struct AffineTransform in Tinman.Terrain.Util

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

struct AffineTransform implements IEquatable<AffineTransform>

Public / Constants

Identity

The identity transform.

public static readonly field Identity
type AffineTransform

Public / Attributes

Rotation

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

public readonly field Rotation
type Mat3D

Scaling

The uniform scale factor of the transform.

public readonly field Scaling
type float64

Translation

The translation component of the transform.

public readonly field Translation
type Vec3D

Public / Constructors

AffineTransform

Creates a new instance of AffineTransform.

public constructor AffineTransform (Vec3D translation)
params translation The translation component of the affine transform.

Creates a new instance of AffineTransform.

public constructor AffineTransform (Mat3D rotation)
params rotation The affine matrix that represents the rotation component of the affine transform.

Creates a new instance of AffineTransform.

public constructor AffineTransform (float64 scaling)
params scaling The uniform scale factor of the affine transform.

Creates a new instance of AffineTransform.

public constructor AffineTransform (Vec3D translation, Mat3D rotation)
params translation The translation component of the affine transform.
  rotation The matrix that represents the rotation / reflection component of the affine transform.

Creates a new instance of AffineTransform.

public constructor AffineTransform (Vec3D translation, float64 scaling)
params translation The translation component of the affine transform.
  scaling The uniform scale factor of the affine transform.

Creates a new instance of AffineTransform.

public constructor AffineTransform (Mat3D rotation, float64 scaling)
params rotation The matrix that represents the rotation / reflection component of the affine transform.
  scaling The uniform scale factor of the affine transform.

Creates a new instance of AffineTransform.

public constructor AffineTransform (Vec3D translation, Mat3D rotation, float64 scaling)
params translation The translation component of the affine transform.
  rotation The matrix that represents the rotation / reflection component of the affine transform.
  scaling The uniform scale factor of the affine transform.

FromMatrix

Creates a new instance of AffineTransform.

[Pure]
public static method FromMatrix (Mat4D matrix)
type AffineTransform
params matrix The matrix for which to create an affine transform.
returns The affine transform.

Public / Methods

Append

Appends the given affine transform to this one.

[Pure]
public method Append (AffineTransform transform)
type AffineTransform
params transform The affine transform to append.
returns The resulting affine transform, which applies this affine transform first and the given transform afterwards. This is opposite to matrix multiplication.

Equals

public method Equals (AffineTransform other)
type bool
params other

EqualsAlmost

[Pure]
public method EqualsAlmost (AffineTransform other)
type bool
params other

Scale

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

[Pure]
public method Scale (float64 factor)
type AffineTransform
params factor The scale factor to apply.
returns The resulting affine transform.

ToMatrix

Converts this affine transform into a matrix.

[Pure]
public method ToMatrix (bool inverse = false)
type Mat4D
params inverse Apply the inverse transformation? Defaults to false.
returns The matrix.

TransformBox

Transforms the given axis-aligned bounding box.

[Pure]
public method TransformBox (Box3D box, bool inverse = false)
type Box3D
params box The axis-aligned bounding box.
  inverse Apply the inverse transformation? Defaults to false.
returns The transformed axis-aligned bounding box.

TransformPoint

Transforms the given point.

[Pure]
public method TransformPoint (Vec3D point, bool inverse = false)
type Vec3D
params point The point.
  inverse Apply the inverse transformation? Defaults to false.
returns The transformed point.

Transforms the given point.

[Pure]
public method TransformPoint (float64 x, float64 y, float64 z, bool inverse = false)
type Vec3D
params x X-coordinate of the point.
  y Y-coordinate of the point.
  z Z-coordinate of the point.
  inverse Apply the inverse transformation? Defaults to false.
returns The transformed point.

TransformRay

Transforms the given ray.

[Pure]
public method TransformRay (Ray ray, bool inverse = false)
type Ray
params ray The ray.
  inverse Apply the inverse transformation? Defaults to false.
returns The transformed ray.

TransformScalar

Transforms the given scalar.

[Pure]
public method TransformScalar (float64 v, bool inverse = false)
type float64
params v The scalar value.
  inverse Apply the inverse transformation? Defaults to false.
returns The transformed scalar.

TransformSphere

Transforms the given bounding sphere.

[Pure]
public method TransformSphere (Sphere sphere, bool inverse = false)
type Sphere
params sphere The bounding sphere.
  inverse Apply the inverse transformation? Defaults to false.
returns The transformed bounding sphere box.

TransformVector

Transforms the given vector.

[Pure]
public method TransformVector (Vec3D vector, bool inverse = false)
type Vec3D
params vector The vector.
  inverse Apply the inverse transformation? Defaults to false.
returns The transformed vector.

Transforms the given vector.

[Pure]
public method TransformVector (float64 x, float64 y, float64 z, bool inverse = false)
type Vec3D
params x X-component of the vector.
  y Y-component of the vector.
  z Z-component of the vector.
  inverse Apply the inverse transformation? Defaults to false.
returns The transformed vector.