sealed class Tinman.Engine.Scenes.Data.GeoPath
<TSample val>
<TTrait val : IGeoPathSampleTrait<TSample>>

Derived from


Represents a 3D path, created from the interpolation of a sequence of GeoPathSample values.

After creation, a geo path is empty. Path samples must be added to it, in order to form a 3D path. The timestamps of samples can be distributed arbitrarily (i.e. there is no requirement for a fixed time-step). The geo path can be used to translate between sample indices and timestamp values.

Smooth interpolation is performed with non-uniform B-splines, where control points are implicitly duplicated before the first and after the last sample. For a given timestamp value T, the influencing geo path samples look like this:

t1     t2 t3       t4   t5        t6   control point timestamp
1      2  3    |   4    5         6    control point index
               T                       interpolation timestamp

Geo path samples are interpolated from the values of control points [2..5].
Interpolation factors are computed from the timestamps of control points [1..6]. If the interpolation timestamp is identical to the control point timestamp (T = t3), the factors are influenced only by the timestamps of control points [1..5].

The interpolated geo path has C2 continuity (see Continuity.Curvature), which reduces to C1 continuity (see Continuity.Tangent) or C0 continuity (see Continuity.Position) if samples are duplicated once or twice.

Public / Constructors


public constructor GeoPath → (1)

datum opt : GeodeticDatum = null

The datum to use for interpreting GeoPathSample.Latitude, GeoPathSample.Longitude and GeoPathSample.Height. If null, GeodeticDatum.WGS84 will be used.

Creates a new instance of GeoPath.

Public / Methods


2 overloads

public method AdjustToGround1 → (5)

geocentric in : Geocentric

The geocentric transformation to use.

sample in : TSample

The geo path sample to adjust to the ground.

height in : RangeD

The height above ground coefficients, in geocentric units:
RangeD.Start defines the minimum height above ground of the resulting geo path.
RangeD.End defines the height above ground at which to start blending from the original path sample to the ground sample.
Set to RangeD.Pos to put all geo path samples to RangeD.Start.

delta opt : float64 = 0

Optional delta to add to the vertical value of sample in before applying ground adjustment.

weight opt : float64 = 1

Optional weight of the ground sample. When the weight is zero, the ground height does not need to be queried, which will improve performance.

returns → TSample

The adjusted geo path sample.

Performs ground adjustment for a single geo path sample.