template<typename CoordinateT, typename DistanceFunction = details::EuclideanDistance<CoordinateT>>
class maliput_sparse::geometry::LineString< CoordinateT, DistanceFunction >::Point
Extends the CoordinateT class with information about the index of the coordinate in the LineString and the \( p \) value up-to the coordinate in the parametrized LineString.
Convenient to use with the KDTree.
#include <include/maliput_sparse/geometry/line_string.h>
◆ Point() [1/3]
◆ Point() [2/3]
Point |
( |
const CoordinateT & |
coordinate, |
|
|
std::size_t |
idx, |
|
|
double |
p |
|
) |
| |
Creates a Point.
- Parameters
-
coordinate | The coordinate of the point. |
idx | The index of the coordinate in the LineString. |
p | The \( p \) value up-to the coordinate in the parametrized LineString. |
- Exceptions
-
maliput::common::assertion_error | When p is negative. |
◆ Point() [3/3]
Point |
( |
const CoordinateT & |
coordinate | ) |
|
|
explicit |
Creates a point.
- Parameters
-
coordinate | The coordinate of the point. |
◆ coordinate()
const CoordinateT* coordinate |
( |
| ) |
const |
- Returns
- The underlying coordinate of the point.
◆ idx()
std::optional<std::size_t> idx |
( |
| ) |
const |
- Returns
- If provided via constructor, the index of the coordinate in the LineString, std::nullopt otherwise.
◆ p()
std::optional<double> p |
( |
| ) |
const |
- Returns
- If provided via constructor, the \( p \) value up-to the coordinate in the parametrized LineString, std::nullopt otherwise.
The documentation for this class was generated from the following file: