Namespace: Esri::GameEngine::Geometry
Class: Esri/GameEngine/Geometry/ArcGISLinearUnit
Since: 1.0.0
Inheritance: ArcGISUnit->ArcGISLinearUnit
Summary
Defines a linear unit of measurement.
Constructors
ArcGISLinearUnit(const ArcGISAreaUnit&)
Creates a linear unit given an area unit.
Since 1.0.0
Arguments
Name | Type | Const | Summary |
---|---|---|---|
area | Yes | The area unit. |
ArcGISLinearUnit(ArcGISLinearUnitId)
Creates a unit given its known id.
Since 1.0.0
Arguments
Name | Type | Const | Summary |
---|---|---|---|
unit | No | The known id of the unit. |
Properties
Property | Type | Nullable | Readonly | Summary |
---|---|---|---|---|
No | Yes | The ArcGISLinearUnitId of the given Linear unit. |
LinearUnitId
ArcGISLinearUnitId GetLinearUnitId() const
The ArcGISLinearUnitId of the given Linear unit.
If an error occurs then ArcGISLinearUnitId::Other is returned.
Methods
Signature | Return Type | Summary |
---|---|---|
ConvertFrom(const ArcGISLinearUnit&, double) | Converts a value in another UOM into this UOM. | |
ConvertTo(const ArcGISLinearUnit&, double) | Converts a value in this UOM into another UOM. | |
Converts a meter value to this UOM. | ||
Converts a value in this UOM to meters. |
ConvertFrom
double ConvertFrom(const ArcGISLinearUnit& fromUnit, double value) const
Converts a value in another UOM into this UOM.
Since 1.0.0
Arguments
Name | Type | Const | Summary |
---|---|---|---|
from | Yes | The UOM to convert from. | |
value | No | The value to convert. |
Returns double
The value in this UOM or NAN if the conversion fails.
ConvertTo
double ConvertTo(const ArcGISLinearUnit& toUnit, double value) const
Converts a value in this UOM into another UOM.
Since 1.0.0
Arguments
Name | Type | Const | Summary |
---|---|---|---|
to | Yes | The UOM to convert to. | |
value | No | The value to convert. |
Returns double
The value in the target UOM or NAN if the conversion fails.
FromMeters
Converts a meter value to this UOM.
Since 1.0.0
Arguments
Name | Type | Const | Summary |
---|---|---|---|
value | No | The value to convert. |
Returns double
The value in this UOM or NAN if the conversion fails.