48std::optional<IntersectionOfLinesResult>
intersectionOfLines(
const std::vector<Eigen::Vector2d>& line1,
49 const std::vector<Eigen::Vector2d>& line2);
65 const Eigen::Vector2d& prev_point,
66 const Eigen::Vector2d& next_point);
79 const Eigen::Vector2d& prev_point,
80 const Eigen::Vector2d& next_point);
92std::vector<Eigen::Vector3d>
resampleLineString(
const std::vector<Eigen::Vector3d>& line_string,
109 double max_lateral_error,
110 const std::vector<size_t>& break_after_indices = {});
119Eigen::Vector2d
projectPointToLineString(
const Eigen::Vector2d& point,
const std::vector<Eigen::Vector2d>& line_string);
128Eigen::Vector3d
projectPointToLineString(
const Eigen::Vector3d& point,
const std::vector<Eigen::Vector3d>& line_string);
147 const Eigen::Vector2d& point,
const Eigen::Vector2d& axis,
const std::vector<Eigen::Vector2d>& line_string);
159 const Eigen::Vector2d& point,
160 const Eigen::Vector2d& prev_point,
161 const Eigen::Vector2d& next_point,
162 const std::vector<Eigen::Vector2d>& line_string);
std::optional< ProjectPointToLineStringAlongAxisResult > projectPointToLineStringAlongAxis(const Eigen::Vector2d &point, const Eigen::Vector2d &axis, const std::vector< Eigen::Vector2d > &line_string)
Projects a point along an axis to the closest line segment of a line string.
std::optional< ProjectPointToLineStringAlongAxisResult > projectPointToLineStringAlongNormal(const Eigen::Vector2d &point, const Eigen::Vector2d &prev_point, const Eigen::Vector2d &next_point, const std::vector< Eigen::Vector2d > &line_string)
Projects a point to the closest line segment of a line string along the normal to the tangent at the ...
double angleBetweenVectors(const Eigen::Vector2d &v1, const Eigen::Vector2d &v2)
Computes the angle between two 2D vectors.
Eigen::Vector2d tangentOfPointAlongLineString(const Eigen::Vector2d &point, const Eigen::Vector2d &prev_point, const Eigen::Vector2d &next_point)
Computes a unit vector tangential to a point along a line string.
Eigen::Vector2d projectPointToLineString(const Eigen::Vector2d &point, const std::vector< Eigen::Vector2d > &line_string)
Projects a point to the closest line segment of a line string.
std::vector< size_t > adaptivelySampleLineString(const std::vector< Eigen::Vector2d > &line_string, double max_lateral_error, const std::vector< size_t > &break_after_indices={})
Simplifies a 2D line string within a maximum lateral error.
double wrapAngle(const double angle)
Wraps an angle to the range [-π, π].
Eigen::Vector2d normalOfPointAlongLineString(const Eigen::Vector2d &point, const Eigen::Vector2d &prev_point, const Eigen::Vector2d &next_point)
Computes a unit vector normal to a point along a line string.
std::vector< Eigen::Vector3d > resampleLineString(const std::vector< Eigen::Vector3d > &line_string, const double delta, double &offset)
Resamples a 3D line string with a constant sampling distance.
std::optional< IntersectionOfLinesResult > intersectionOfLines(const std::vector< Eigen::Vector2d > &line1, const std::vector< Eigen::Vector2d > &line2)
Computes the intersection of two 2D lines.
Return type of intersectionOfLines.
bool intersects_line2
whether intersection is on second line segment
bool intersects_line1
whether intersection is on first line segment
Eigen::Vector2d intersection
intersection point
Return type of projectPointToLineStringAlongAxis.
bool found_intersection_with_line_segment
whether intersection is on line segment
Eigen::Vector2d projected_point
intersection point