Template Function lanelet::geometry::interpolatedPointAtDistance
Defined in File LineString.h
Function Documentation
-
template<typename LineStringT>
traits::BasicPointT<traits::PointType<LineStringT>> lanelet::geometry::interpolatedPointAtDistance(LineStringT lineString, double dist) Returns the piecewise linearly interpolated point at the given distance. Negative distances are interpreted backwards from the end.
This function works in 2d or 3d, depending on the type of the lineString. If the distance is greater length, the end point is returned (or start point if <0).
- Parameters:
lineString – the lineString to iterate. Size must be >0.
dist – distance along linestring. If negative, the lineString is iterated in reversed order.
- Returns:
The interpolated point (a new point if not perfectly matching)