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

class UnitOfMeasure in Tinman.Terrain.Georef

Represents a unit of measure for a value type (scale, length or angle).

[ShutdownSurvive]
sealed class UnitOfMeasure extends GeoObject

See also:

GeoRegistry

Private / Constructors

UnitOfMeasure

Private constructor.

[Internal]
public constructor UnitOfMeasure ()

Configuration

Config

The configurator object for this type.

public static property Config { get }
type IConfigurator<UnitOfMeasure>
value [not-null] The configurator object.

ConfigType

The configurator object for this type.

public static property ConfigType { get }
type IConfigurator<UnitOfMeasureType>
value [not-null] The configurator object.

ToConfig

Returns the configuration value that describes this object.

public override method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
implements GeoObject.ToConfig

Remarks:

All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.

The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.

Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.

Exceptions:

Serialization

SerialId

Serialization information about this type.

public static readonly field SerialId
type ISerialTypeInfo

Public / Constants

ArcMinute

Angle value: 0.0002908882086657213

public static readonly field ArcMinute
type UnitOfMeasure

See also:

UnitOfMeasureType.Angle

ArcSecond

Angle value: 0.000004848136811095355

public static readonly field ArcSecond
type UnitOfMeasure

See also:

UnitOfMeasureType.Angle

Degree

Angle value: 0.0174532925199433

public static readonly field Degree
type UnitOfMeasure

See also:

UnitOfMeasureType.Angle

Foot

Length value: 0.3048

public static readonly field Foot
type UnitOfMeasure

See also:

UnitOfMeasureType.Length

Grad

Angle value: 0.01570796326794895

public static readonly field Grad
type UnitOfMeasure

See also:

UnitOfMeasureType.Angle

Kilometre

Length value: 1000.0

public static readonly field Kilometre
type UnitOfMeasure

See also:

UnitOfMeasureType.Length

Metre

Length value: 1.0

public static readonly field Metre
type UnitOfMeasure

Remarks:

This is the default unit.

See also:

UnitOfMeasureType.Length

PartsPerBillion

Scale value: 1E-9

public static readonly field PartsPerBillion
type UnitOfMeasure

See also:

UnitOfMeasureType.Scale

PartsPerMillion

Scale value: 1E-6

public static readonly field PartsPerMillion
type UnitOfMeasure

See also:

UnitOfMeasureType.Scale

Radian

Angle in radians: 2 * PI

public static readonly field Radian
type UnitOfMeasure

Remarks:

This is the default unit.

See also:

UnitOfMeasureType.Angle

Unity

Scale value: 1.0

public static readonly field Unity
type UnitOfMeasure

Remarks:

This is the default unit.

See also:

UnitOfMeasureType.Scale

Public / Attributes

IsDefault

public property IsDefault { get }
type bool
value

Name

The human-readable name of this object.

public property Name { get }
type string
value [not-empty] The object name.
inherited GeoObject.Name

One

The value of 1 in this unit, expressed in the unit type's default unit.

public property One { get }
type float64
value The default value.

SerialType

Returns the serial type of this object.

public property SerialType { get }
type ISerialTypeInfo
value [not-null] The serial type.
inherited SerializableBase.SerialType

SerialVersion

Returns the serial data version.

public virtual property SerialVersion { get }
type int32
value [>=1] The serial data version tag.
inherited SerializableBase.SerialVersion

Remarks:

An ISerializable implementation is required to support all versions up to the one returned by SerialVersion.

See also:

ISerializable.Serialize
ISerializable.Deserialize

Type

The type of this geo object.

public property Type { get }
type GeoObjectType
value The geo object type.
inherited GeoObject.Type

UnitType

The type of this unit (e.g. length or angle).

public property UnitType { get }
type UnitOfMeasureType
value The unit type.

Public / Constructors

UnitOfMeasure

Creates a new instance of UnitOfMeasure.

public constructor UnitOfMeasure (float64 one, UnitOfMeasureType type, string name = null)
params one The value of 1 in this unit, expressed in the unit type type's standard unit.
  type The type of this unit (e.g. length or angle).
  name Human-readable name of the geo object. If empty or null, UserDefined will be used instead. Defaults to null.

Public / Methods

Default

Returns the default unit for the given type.

[Pure]
public static method Default (UnitOfMeasureType type)
type UnitOfMeasure
params type The unit type.
returns [not-null] The default unit.

Deserialize

Initializes the state of this object from the given data stream.

public override method Deserialize (int32 serialVersion, ISerializer data)
type ISerializable
params serialVersion [>=1] The serial data version.
  data [not-null] The serial data stream.
returns [not-null] The deserialized object. This will typically be this, but in some circumstances, another instance may be returned (e.g. singletons).
overrides GeoObject.Deserialize

Remarks:

The Deserialize method will be called immediately after the object has been instantiated via its default constructor.

The provided serialVersion number is guaranteed to be equal to or less than the SerialVersion returned by this object (i.e. ISerializable object must provide backwards compatibility).

See also:

ISerializable.Serialize
ISerializable.SerialVersion

Exceptions:

Equals

Compares this object with the given one.

[Pure]
public override method Equals (IGeoObject other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
overrides GeoObject.Equals

Compares this object with the given one.

[Pure]
public override sealed method Equals (object other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
inherited GeoObject.Equals

From

Converts the given value to this unit.

[Pure]
public method From (float64 value, UnitOfMeasure unit = null)
type float64
params value The value, given in unit s.
  unit The value unit. If null the default unit will be used. Defaults to null.
returns The converted value, in this unit.

GetHashCode

[Pure]
public override sealed method GetHashCode ()
type int32
inherited GeoObject.GetHashCode

Serialize

Serializes the current state of this object to the given data stream.

public override method Serialize (ISerializer data)
params data [not-null] The serial data stream.
overrides GeoObject.Serialize

See also:

ISerializable.Deserialize
ISerializable.SerialVersion

Exceptions:

To

Converts a value to the given unit.

[Pure]
public method To (float64 value, UnitOfMeasure unit = null)
type float64
params value The value, given in this unit.
  unit The unit to convert to. If null the default unit will be used. Defaults to null.
returns The converted value, in given unit s.

ToString

[Pure]
public override sealed method ToString ()
type string
inherited GeoObject.ToString