IGeometry

Description

interface Tinman.Terrain.Geometries.IGeometry

Derived from

IMapInfo

Extended by

GeometryBase abstract

Represents the base geometry of a terrain in terrain-space. The center of the terrain always resides at the coordinate origin in terrain-space.

Public / Methods

Compute​Coordinates

2 overloads


[Pure]
public method ComputeCoordinates1 → (4)

positionX in : float64

X-coordinate of position in terrain-space.

positionY in : float64

Y-coordinate of position in terrain-space.

positionZ in : float64

Z-coordinate of position in terrain-space.

heightmap out : Vec3D

Output for heightmap coordinates.

returns → float64

The terrain-space elevation, in terrain-space units (see Unit).

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


[Pure]
public method ComputeCoordinates2 → (1)

geographic in : LatLon

The geographic coordinates.

returns → Vec3D

The heightmap coordinates or Vec3D.Undefined is this geometry object is not geo-referenced (see ToGeocentric).

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

Compute​Lat​Lon


[Pure]
public method ComputeLatLon → (3)

heightmapX in : float64

The heightmap X-coordinate.

heightmapY in : float64

The heightmap Y-coordinate.

heightmapZ in : float64

The heightmap Z-coordinate.

returns → LatLon

The geographic coordinates or LatLon.Undefined if this geometry object is not geo-referenced (see ToGeocentric).

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

Compute​North


[Pure]
public method ComputeNorth → (3)

heightmapX in : float64

The heightmap X-coordinate.

heightmapY in : float64

The heightmap Y-coordinate.

heightmapZ in : float64

The heightmap Z-coordinate.

returns → Vec3D

The unit-length vertex north-vector.

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

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.

Compute​Position


[Pure]
public method ComputePosition → (6)

heightmapX in : float64

The heightmap X-coordinate.

heightmapY in : float64

The heightmap Y-coordinate.

heightmapZ in : float64

The heightmap Z-coordinate.

elevation in : float64

The terrain-space elevation, in terrain-space units (see Unit).

position out : Vec3D

Output for vertex position.

up out : Vec3D

Output for unit-length up-vector.

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

Compute​Up


[Pure]
public method ComputeUp → (3)

heightmapX in : float64

The heightmap X-coordinate.

heightmapY in : float64

The heightmap Y-coordinate.

heightmapZ in : float64

The heightmap Z-coordinate.

returns → Vec3D

The unit-length vertex up-vector.

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

To​Handedness


[Pure]
public method ToHandedness → (1)

handedness in : CartesianHandedness

The requested handedness.

returns → IGeometry

The resulting geometry.

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

To​Size


[Pure]
public method ToSize → (1)

size in : int32

[pow2]
The map size.

returns → IGeometry

The resulting geometry.

Changes the map size of this geometry.

If the given size in is identical to the map size of this geometry object, this method returns this.

See also

MapInfo.Size

Transform


[Pure]
public method Transform → (1)

matrix in : Mat4D

The transformation matrix.

returns → IGeometry

The resulting geometry.

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

Public / Attributes

Handedness


[Constant]
public attribute Handedness → (get)

value : CartesianHandedness

The coordinate system handedness.

Returns the handedness of this geometry object.

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.

To​Geocentric


[Constant]
public attribute ToGeocentric → (get)

value : Geocentric

The Geocentric object or null if this is a custom geometry object.

Returns the of Geocentric objects that corresponds to this geometry.

Unit


[Constant]
public attribute Unit → (get)

value : UnitOfMeasure

[not-null]
The terrain-space unit.

The terrain-space unit.

The default unit is UnitOfMeasure.Metre.

Extensions

Bounding​Sphere

2 overloads


[Pure]
public static method BoundingSphere1 → (2)

elevationMax opt : float64 = 0

The maximum terrain-space elevation value.

elevationMin opt : float64 = 0

The minimum terrain-space elevation value.

returns → Sphere

The bounding sphere, in terrain-space.

Computes the bounding sphere that contains all vertex positions generated by this IGeometry object for elevation values in the given range.


[Pure]
public static method BoundingSphere2 → (2)

range in : VerticalRange

The elevation range, in unit opts.

unit opt : UnitOfMeasure = null

The elevation range unit. If null, terrain-space is used (see IGeometry.Unit).

returns → Sphere

The bounding sphere, in terrain-space.

Computes the bounding sphere that contains all vertex positions generated by this IGeometry object for elevation values in the given range.

Compute​Coordinates

2 overloads


[Pure]
public static method ComputeCoordinates1 → (2)

position in : Vec3I

The position in terrain-space.

heightmap out : Vec3D

Output for heightmap coordinates.

returns → float64

The terrain-space elevation.

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


[Pure]
public static method ComputeCoordinates2 → (2)

position in : Vec3D

The position in terrain-space.

heightmap out : Vec3D

Output for heightmap coordinates.

returns → float64

The terrain-space elevation.

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

Compute​Derivative

3 overloads


[Pure]
public static method ComputeDerivative1 → (4)

coords in : CubemapFaceCoordsI

The cubemap face coordinates.

dFaceX out : Vec3D

Output for partial derivative vector along cubemap face X-axis.

dFaceY out : Vec3D

Output for partial derivative vector along cubemap face Y-axis.

elevation opt : float64 = 0

The terrain-space elevation.

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


[Pure]
public static method ComputeDerivative2 → (4)

coords in : CubemapFaceCoordsD

The cubemap face coordinates.

dFaceX out : Vec3D

Output for partial derivative vector along cubemap face X-axis.

dFaceY out : Vec3D

Output for partial derivative vector along cubemap face Y-axis.

elevation opt : float64 = 0

The terrain-space elevation.

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


[Pure]
public static method ComputeDerivative3 → (6)

faceX in : float64

The cubemap face X-coordinate.

faceY in : float64

The cubemap face Y-coordinate.

face in : CubemapFace

The cubemap face.

dFaceX out : Vec3D

Output for partial derivative vector along cubemap face X-axis.

dFaceY out : Vec3D

Output for partial derivative vector along cubemap face Y-axis.

elevation opt : float64 = 0

The terrain-space elevation.

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

Compute​Lat​Lon

2 overloads


[Pure]
public static method ComputeLatLon1 → (1)

heightmap in : Vec3I

The heightmap coordinates.

returns → LatLon

The geographic coordinates or LatLon.Undefined if this geometry object is not geo-referenced (see IGeometry.ToGeocentric).

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


[Pure]
public static method ComputeLatLon2 → (1)

heightmap in : Vec3D

The heightmap coordinates.

returns → LatLon

The geographic coordinates or LatLon.Undefined if this geometry object is not geo-referenced (see IGeometry.ToGeocentric).

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

Compute​Local

3 overloads


[Pure]
public static method ComputeLocal1 → (1)

heightmap in : Vec3I

The heightmap coordinates.

returns → Mat3D

The orthogonal matrix that transforms from local coordinate space to terrain space, without translation.

Computes a local coordinate system for the given heightmap coordinates.

The coordinate system axes are defined as follows:

  • X+
    Aligned with terrain side-vector at the given coordinates.
    side = cross(up, north).
    The side vector points westwards for CartesianHandedness.RightHanded and eastwards for CartesianHandedness.LeftHanded.

  • Y+
    Aligned with terrain up-vector at the given coordinates.

  • Z+
    Perpendicular to side-vector and up-vector, pointing northwards.


[Pure]
public static method ComputeLocal2 → (1)

heightmap in : Vec3D

The heightmap coordinates.

returns → Mat3D

The orthogonal matrix that transforms from local coordinate space to terrain space, without translation.

Computes a local coordinate system for the given heightmap coordinates.

The coordinate system axes are defined as follows:

  • X+
    Aligned with terrain side-vector at the given coordinates.
    side = cross(up, north).
    The side vector points westwards for CartesianHandedness.RightHanded and eastwards for CartesianHandedness.LeftHanded.

  • Y+
    Aligned with terrain up-vector at the given coordinates.

  • Z+
    Perpendicular to side-vector and up-vector, pointing northwards.


[Pure]
public static method ComputeLocal3 → (3)

heightmapX in : float64

The heightmap X-coordinate.

heightmapY in : float64

The heightmap Y-coordinate.

heightmapZ in : float64

The heightmap Z-coordinate.

returns → Mat3D

The orthogonal matrix that transforms from local coordinate space to terrain space, without translation.

Computes a local coordinate system for the given heightmap coordinates.

The coordinate system axes are defined as follows:

  • X+
    Aligned with terrain side-vector at the given coordinates.
    side = cross(up, north).
    The side vector points westwards for CartesianHandedness.RightHanded and eastwards for CartesianHandedness.LeftHanded.

  • Y+
    Aligned with terrain up-vector at the given coordinates.

  • Z+
    Perpendicular to side-vector and up-vector, pointing northwards.

Compute​North

2 overloads


[Pure]
public static method ComputeNorth1 → (1)

heightmap in : Vec3I

The heightmap coordinates.

returns → Vec3D

The unit-length vertex north-vector.

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

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.


[Pure]
public static method ComputeNorth2 → (1)

heightmap in : Vec3D

The heightmap coordinates.

returns → Vec3D

The unit-length vertex north-vector.

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

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.

Compute​Position

5 overloads


[Pure]
public static method ComputePosition1 → (2)

heightmap in : Vec3I

The heightmap coordinates.

elevation opt : float64 = 0

The terrain-space elevation.

returns → Vec3D

The vertex position.

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


[Pure]
public static method ComputePosition2 → (2)

heightmap in : Vec3D

The heightmap coordinates.

elevation opt : float64 = 0

The terrain-space elevation.

returns → Vec3D

The vertex position.

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


[Pure]
public static method ComputePosition3 → (4)

heightmapX in : float64

The heightmap X-coordinate.

heightmapY in : float64

The heightmap Y-coordinate.

heightmapZ in : float64

The heightmap Z-coordinate.

elevation opt : float64 = 0

The terrain-space elevation.

returns → Vec3D

The vertex position.

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


[Pure]
public static method ComputePosition4 → (4)

heightmap in : Vec3I

The heightmap coordinates.

elevation in : float64

The terrain-space elevation.

position out : Vec3D

Output for vertex position.

up out : Vec3D

Output for unit-length up-vector.

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


[Pure]
public static method ComputePosition5 → (4)

heightmap in : Vec3D

The heightmap coordinates.

elevation in : float64

The terrain-space elevation.

position out : Vec3D

Output for vertex position.

up out : Vec3D

Output for unit-length up-vector.

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

Compute​Up

2 overloads


[Pure]
public static method ComputeUp1 → (1)

heightmap in : Vec3I

The heightmap coordinates.

returns → Vec3D

The unit-length vertex up-vector.

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


[Pure]
public static method ComputeUp2 → (1)

heightmap in : Vec3D

The heightmap coordinates.

returns → Vec3D

The unit-length vertex up-vector.

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

Scale


[Pure]
public static method Scale → (1)

scale in : float64

The scale factor.

returns → IGeometry

The resulting geometry.

Returns a scaled version of this geometry.

To​Unit


[Pure]
public static method ToUnit → (1)

unit in : UnitOfMeasure

[not-null]
The new terrain-space unit.

returns → IGeometry

The resulting geometry.

Scales this geometry to the given terrain-space unit.