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

class GeometryBase in Tinman.Terrain.Geometries

Abstract base class for IGeometry implementations.

abstract class GeometryBase implements IGeometry
  base of Geometry

Public / Attributes

Handedness

Returns the handedness of this geometry object.

[ThreadSafe]
public abstract property Handedness { get }
type CartesianHandedness
value The coordinate system handedness.
implements IGeometry.Handedness

Remarks:

The handedness of a geometry is taken into account when vertex normal vectors are computed: Normal vectors are computed from vertex positions using a counter-clockwise winding in heightmap space. Since heightmap space is always right-handed, all computed normal vectors must be flipped when the application uses a left-handed world coordinate system.

Map

Returns a MapInfo value that describes the used map raster.

public property Map { get }
type MapInfo
value The map info value.
implements IMapInfo.Map

ToGeocentric

Returns an instance of Geocentric that corresponds to this geometry.

public virtual property ToGeocentric { get }
type Geocentric
value The Geocentric object or null if this is a custom geometry object.
implements IGeometry.ToGeocentric

Unit

The terrain-space unit.

public virtual property Unit { get }
type UnitOfMeasure
value [not-null] The terrain-space unit.
implements IGeometry.Unit

Remarks:

The default unit is Metre.

Public / Methods

ComputeCoordinates

Computes the heightmap coordinates that correspond to the given geographic coordinates.

[ThreadSafe]
public virtual method ComputeCoordinates (LatLon geographic)
type Vec3D
params geographic The geographic coordinates.
returns The heightmap coordinates or Undefined is this geometry object is not geo-referenced (see ToGeocentric).
implements IGeometry.ComputeCoordinates

Computes the heightmap coordinates and elevation that correspond to the given position.

[ThreadSafe]
public abstract method ComputeCoordinates (float64 positionX, float64 positionY, float64 positionZ, out Vec3D heightmap)
type float64
params positionX X-coordinate of position in terrain-space.
  positionY Y-coordinate of position in terrain-space.
  positionZ Z-coordinate of position in terrain-space.
  heightmap Output for heightmap coordinates.
returns The terrain-space elevation, in terrain-space units (see Unit).
implements IGeometry.ComputeCoordinates

ComputeLatLon

Computes the geographic coordinates that correspond to the given heightmap coordinates.

[ThreadSafe]
public virtual method ComputeLatLon (float64 heightmapX, float64 heightmapY, float64 heightmapZ)
type LatLon
params heightmapX The heightmap X-coordinate.
  heightmapY The heightmap Y-coordinate.
  heightmapZ The heightmap Z-coordinate.
returns The geographic coordinates or Undefined if this geometry object is not geo-referenced (see ToGeocentric).
implements IGeometry.ComputeLatLon

ComputeNorth

Computes the vertex north-vector for the given heightmap coordinates.

[ThreadSafe]
public abstract method ComputeNorth (float64 heightmapX, float64 heightmapY, float64 heightmapZ)
type Vec3D
params heightmapX The heightmap X-coordinate.
  heightmapY The heightmap Y-coordinate.
  heightmapZ The heightmap Z-coordinate.
returns The unit-length vertex north-vector.
implements IGeometry.ComputeNorth

Remarks:

The north-vector is perpendicular to the up-vector and points towards the terrain North Pole, which is defined by the implementing class and can assume different meanings.

ComputePosition

Computes the vertex position that corresponds to the given heightmap coordinates and elevation.

[ThreadSafe]
public abstract method ComputePosition (float64 heightmapX, float64 heightmapY, float64 heightmapZ, float64 elevation, out Vec3D position, out Vec3D up)
params heightmapX The heightmap X-coordinate.
  heightmapY The heightmap Y-coordinate.
  heightmapZ The heightmap Z-coordinate.
  elevation The terrain-space elevation, in terrain-space units (see Unit).
  position Output for vertex position.
  up Output for unit-length up-vector.
returns The vertex position.
implements IGeometry.ComputePosition

ComputeUp

Computes the vertex up-vector for the given heightmap coordinates.

[ThreadSafe]
public virtual method ComputeUp (float64 heightmapX, float64 heightmapY, float64 heightmapZ)
type Vec3D
params heightmapX The heightmap X-coordinate.
  heightmapY The heightmap Y-coordinate.
  heightmapZ The heightmap Z-coordinate.
returns The unit-length vertex up-vector.
implements IGeometry.ComputeUp

ToHandedness

Transforms this geometry to the given handedness by flipping the Z-axis if necessary.

public virtual method ToHandedness (CartesianHandedness handedness)
type IGeometry
params handedness The requested handedness.
returns [not-null] The resulting geometry.
implements IGeometry.ToHandedness

Transform

Creates a geometry that transforms the output coordinates of this geometry with the given matrix.

public virtual method Transform (Mat4D matrix)
type IGeometry
params matrix The transformation matrix.
returns [not-null] The resulting geometry.
implements IGeometry.Transform

Protected / Constructors

GeometryBase

Creates a new instance of GeometryBase.

protected constructor GeometryBase (IGeometry other)
params other [not-null] The base geometry object.

Creates a new instance of GeometryBase.

protected constructor GeometryBase (int32 width, int32 height, MapType mapType)
params width [>0] The map width, in samples.
  height [>0] The map height, in samples.
  mapType The map type.