Loading...
Searching...
No Matches
dipla::aigenlib::Point Struct Reference
Three-dimensional value type for route arithmetic. More...
#include <aigenlib.hpp>
Inheritance diagram for dipla::aigenlib::Point:
Public Member Functions | |
| Point (double east=0.0, double north=0.0, double altitude=0.0) | |
| Construct a point. | |
| double & | x () noexcept |
| Access east. | |
| double | x () const noexcept |
| Access east. | |
| double & | y () noexcept |
| Access north. | |
| double | y () const noexcept |
| Access north. | |
| double & | z () noexcept |
| Access altitude. | |
| double | z () const noexcept |
| Access altitude. | |
| double & | operator[] (std::size_t index) |
| Checked coordinate access. | |
| double | operator[] (std::size_t index) const |
| Checked coordinate access. | |
| double | norm () const noexcept |
| Euclidean length. | |
| bool | finite () const noexcept |
| Check every coordinate. | |
| Point & | operator+= (const Point &other) noexcept |
| Add coordinates. | |
| Point & | operator-= (const Point &other) noexcept |
| Subtract coordinates. | |
Public Attributes | |
| std::array< double, 3 > | coordinates {} |
| East, north, altitude. | |
Detailed Description
Three-dimensional value type for route arithmetic.
Coordinates use metres; norm uses overflow-resistant hypot.
Constructor & Destructor Documentation
◆ Point()
| dipla::aigenlib::Point::Point | ( | double | east = 0.0, |
| double | north = 0.0, | ||
| double | altitude = 0.0 ) |
Construct a point.
- Parameters
-
east East. north North. altitude Height.
Member Function Documentation
◆ finite()
|
noexcept |
Check every coordinate.
- Returns
- True if finite.
◆ norm()
|
noexcept |
Euclidean length.
- Returns
- Nonnegative length.
◆ operator+=()
Add coordinates.
- Parameters
-
other Addend.
- Returns
- This point.
◆ operator-=()
Subtract coordinates.
- Parameters
-
other Subtrahend.
- Returns
- This point.
◆ operator[]() [1/2]
| double & dipla::aigenlib::Point::operator[] | ( | std::size_t | index | ) |
Checked coordinate access.
- Parameters
-
index Coordinate 0..2.
- Returns
- Mutable value.
◆ operator[]() [2/2]
| double dipla::aigenlib::Point::operator[] | ( | std::size_t | index | ) | const |
Checked coordinate access.
- Parameters
-
index Coordinate 0..2.
- Returns
- Value.
◆ x() [1/2]
|
noexcept |
Access east.
- Returns
- Coordinate.
◆ x() [2/2]
|
noexcept |
Access east.
- Returns
- Mutable coordinate.
◆ y() [1/2]
|
noexcept |
Access north.
- Returns
- Coordinate.
◆ y() [2/2]
|
noexcept |
Access north.
- Returns
- Mutable coordinate.
◆ z() [1/2]
|
noexcept |
Access altitude.
- Returns
- Coordinate.
◆ z() [2/2]
|
noexcept |
Access altitude.
- Returns
- Mutable coordinate.
Member Data Documentation
◆ coordinates
| std::array<double, 3> dipla::aigenlib::Point::coordinates {} |
East, north, altitude.
The documentation for this struct was generated from the following files:
- aigenlib/aigenlib.hpp
- aigenlib/aigenlib.cpp