DataUtil

Description

static class Tinman.Engine.Scenes.Data.DataUtil

Helper class for this namespace.

The following members can be used to obtain IGeoPathConverter objects:

Public / Constants

Convert​Geo


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

A converter that manipulates GeoPathSample values.

Use this object as a prototype for creating a converted object that transforms between different horizontal and/or vertical datums.

Convert​Geo​To​Ground


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

A converter from GeoPathSample to GroundPathSample.

Use this object as a prototype for creating a converted object that transforms between different horizontal and/or vertical datums.

Convert​Ground


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

A converter that manipulates GroundPathSample values.

Use this object as a prototype for creating a converted object that transforms between different horizontal and/or vertical datums.

Convert​Ground​To​Geo


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

A converter from GroundPathSample to GeoPathSample.

Use this object as a prototype for creating a converted object that transforms between different horizontal and/or vertical datums.

Public / Methods

Angle​Clamp


[Pure]
public static method AngleClamp → (2)

degrees in : float64

The angle to clamp, in degrees.

range in : RangeD

The normalized angle range (see AngleNormalize).

returns → float64

The clamped angle, in degrees.

Clamps the given angle to the given normalized angle range.

Angle​Flip


public static method AngleFlip → (1)

range in : RangeD

The normalized angle range (see AngleNormalize).

returns → RangeD

The flipped normalized angle range.

Flips a normalized angle range.

Angle​Normalize


[Pure]
public static method AngleNormalize → (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[.

Angle​Unwrap


[Pure]
public static method AngleUnwrap → (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.

Convert​To​Geo


[Pure]
public static method ConvertToGeo → ()
<TSample val>
<TTrait val : IGeoPathSampleTrait<TSample>>

returns → IGeoPathSampleConverter<TSample, GeoPathSample>

The sample converter.

Returns a IGeoPathSampleConverter that converts samples to GeoPathSample.

Convert​To​Ground


[Pure]
public static method ConvertToGround → ()
<TSample val>
<TTrait val : IGeoPathSampleTrait<TSample>>

returns → IGeoPathSampleConverter<TSample, GroundPathSample>

The sample converter.

Returns a IGeoPathSampleConverter that converts samples to GroundPathSample.

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.

Value​Arrays

2 overloads


public static method ValueArrays1 → (1)
<TSample val>
<TTrait val : IGeoPathSampleTrait<TSample>>

count opt : int32 = -1

The size of each value array or negative to leave null.

returns → float64 [ ] [ ]

The nested geo path sample value arrays.

Creates nested geo path value arrays for use with IGeoPathSampleTrait.Read and IGeoPathReader.ReadComponents.


public static method ValueArrays2 → (2)

values in : int32

[>=0]
The number of geo path sample values, see IGeoPathSampleTrait.Count.

count opt : int32 = -1

The size of each value array or negative to leave null.

returns → float64 [ ] [ ]

The nested geo path sample value arrays.

Creates nested geo path value arrays for use with IGeoPathSampleTrait.Read and IGeoPathReader.ReadComponents.

Vertical


[Pure]
public static method Vertical → (2)

type in : GeoPathValue

The GeoPathValue value.

invariant opt : bool = true

true to return VerticalType.Height for GeoPathValue.Height,
false to return VerticalType.HeightMesh for GeoPathValue.Height.

returns → VerticalType

The corresponding VerticalType value.

Returns the VerticalType for the given GeoPathValue.