DataUtil

Description

static class Tinman.Engine.Scenes.Data.DataUtil

Helper class for this namespace.

Public / Constants

GeoToGround


[ShutdownSurvive]
public static readonly attribute GeoToGround → (IGeoPathConverter<GeoPathSample, GroundPathSample>)

A converter from GeoPathSample to GroundPathSample.

Use this object as a prototype for creating a converted object that transforms vertical coordinates according to the geoid / DEM.

GroundToGeo


[ShutdownSurvive]
public static readonly attribute GroundToGeo → (IGeoPathConverter<GroundPathSample, GeoPathSample>)

A converter from GroundPathSample to GeoPathSample.

Use this object as a prototype for creating a converted object that transforms vertical coordinates according to the geoid / DEM.

Public / Methods

Clamp


[Pure]
public static method Clamp → (2)

degrees in : float64

The angle to clamp, in degrees.

range in : RangeD

The normalized angle range (see Normalize).

returns → float64

The clamped angle, in degrees.

Clamps the given angle to the given normalized angle range.

Flip


public static method Flip → (1)

range in : RangeD

The normalized angle range (see Normalize).

returns → RangeD

The flipped normalized angle range.

Flips a normalized angle range.

Normalize


[Pure]
public static method Normalize → (1)

range in : RangeD

The angle range to normalize, in degrees.

returns → RangeD

The normalized angle range, in degrees

Normalizes the given angle range, so that RangeD.Start lies between [-180..180] and RangeD.End lies between [-180..180+360[.

Process

2 overloads


[Pure]
public static method Process1 → (2)

value in : float64

The value to process.

flag in : GeoPathFlag

The geo path value flag to apply.

returns → float64

The processed value.

Processes the given value after reading it from a storage array.


[Pure]
public static method Process2 → (3)

valuePrevious in : float64

The value that precedes valueCurrent in.

valueCurrent in : float64

The value to process.

flag in : GeoPathFlag

The geo path value flag to apply.

returns → float64

The processed value. Will be equal to valueCurrent in if flag in is GeoPathFlag.None.

Processes the given value before writing it to a storage array.

Unwrap


[Pure]
public static method Unwrap → (2)

first in : float64

The first angle value, in degrees.

second in : float64

The second angle value, in degrees.

returns → float64

The unwrapped second angle value for the short path, in degrees.

Unwraps the given angles, so that linear interpolation will take the short path.

For example:

first  = 17
second = 220
result = second - 360 = -140

The long interpolation path would be from 17 to 220, running over 203 degrees.
The short interpolation path would be from 17 to -140, running over 157 degrees.

Vertical


[Pure]
public static method Vertical → (1)

type in : GeoPathValue

The GeoPathValue value.

returns → VerticalType

The corresponding VerticalType value.

Returns the VerticalType for the given GeoPathValue.