ITerrainTransform

Description

interface Tinman.Engine.Scenes.Util.ITerrainTransform

Derived from

IVersioned
IMeshBound

Extended by

IdentityTransform sealed
SimpleTransform sealed
TerrainTransform abstract

Base interface for classes that represent a transformation between terrain-space and model-space.

Public / Methods

Append


public method Append → (1)

other in : ITerrainTransform

[not-null]
The other terrain transform.

returns → ITerrainTransform

The resulting terrain transform.

Appends the given transform to this one.

The concatenated transforms are applied as follows:

  • V' = other.ToTerrain * this.ToTerrain * V

  • V = this.ToModel * other.ToModel * V'

where V is a point in model-space and V' is a point in terrain-space.

Compute


public method Compute → ()

Triggers all (re-)computations.

This method may be called repeatedly. It will only perform work when necessary.

Modify​Origin


public method ModifyOrigin → (1)

origin in : Vec3D

The point in terrain-space.

returns → bool

true if this terrain transform has been modified so that the coordinate origin in model-space is at the given origin in point in terrain-space.
false if this terrain transform has not been modified.

Tries to modify this terrain transform so that the coordinate origin in model-spaces moves to the given point in terrain-space.

Public / Attributes

Needs​Mesh


public attribute NeedsMesh → (get)

value : bool

true if a bound mesh is required,
false if not.

Does this ITerrainTransform require a bound IMesh object?

If this property is false, the Transform property will yield correct results, even if IMeshBound.HasMesh is false.
If this property is true, the Transform property will yield incorrect results when IMeshBound.HasMesh is false.

Transform


public attribute Transform → (get)

value : AffineTransform

The affine transformation or AffineTransform.Identity if NeedsMesh is true and IMeshBound.HasMesh is false.

Returns the affine transformation from model-space to terrain-space, (re-)computing it if necessary.

It is not necessary to call Compute before getting this property.

Extensions

Model​Origin


public static method ModelOrigin → ()

returns → Vec3D

The point in model-space that corresponds to the coordinate origin in terrain-space.

Transforms the coordinate origin in terrain-space to model-space.

Terrain​Origin


public static method TerrainOrigin → ()

returns → Vec3D

The point in terrain-space that corresponds to the coordinate origin in model-space.

Transforms the coordinate origin in model-space to terrain-space.