Distance Class Reference
|
CPP API
|
mio::geo::Distance Class Reference
Represents a distance. More...
#include <distance.h>
Public Member Functions | |
| auto | default_serialize () |
| This method is used by the default serialization feature. More... | |
| Distance ()=default | |
| Default ctor, unitinialized. More... | |
| constexpr | Distance (ScalarType meters) |
| Creates a Distance from a specified distance in meters. More... | |
| ScalarType | kilometers () const |
| return distance in kilometers. More... | |
| ScalarType | meters () const |
| return distance in meters. More... | |
Comparison operators. | |
| bool | operator== (const Distance &other) const |
| bool | operator!= (const Distance &other) const |
| bool | operator< (const Distance &other) const |
| bool | operator<= (const Distance &other) const |
| bool | operator> (const Distance &other) const |
| bool | operator>= (const Distance &other) const |
| Distance | operator+ (const Distance &m) const |
| Add or subtract a Distance. More... | |
| Distance & | operator+= (const Distance &m) |
| Add or subtract a Distance. More... | |
| Distance | operator- (const Distance &m) const |
| Add or subtract a Distance. More... | |
| Distance & | operator-= (const Distance &m) |
| Add or subtract a Distance. More... | |
Private Attributes | |
| ScalarType | m_meters |
| The distance in meters. More... | |
Detailed Description
Represents a distance.
Internally, all distances are stored in meters.
Constructor & Destructor Documentation
◆ Distance() [1/2]
|
default |
Default ctor, unitinialized.
◆ Distance() [2/2]
|
inlineexplicitconstexpr |
Creates a Distance from a specified distance in meters.
- Parameters
-
[in] meters The distance in meters.
Member Function Documentation
◆ default_serialize()
|
inline |
This method is used by the default serialization feature.
◆ kilometers()
|
inline |
return distance in kilometers.
◆ meters()
|
inline |
return distance in meters.
◆ operator!=()
|
inline |
◆ operator+()
Add or subtract a Distance.
◆ operator+=()
◆ operator-()
Add or subtract a Distance.
◆ operator-=()
◆ operator<()
|
inline |
◆ operator<=()
|
inline |
◆ operator==()
|
inline |
◆ operator>()
|
inline |
◆ operator>=()
|
inline |
Member Data Documentation
◆ m_meters
|
private |
The distance in meters.
Generated by