maliput_sparse
geometry.cc File Reference
#include "maliput_sparse/geometry/utility/geometry.h"
#include <algorithm>
#include <cmath>
#include <numeric>
#include <maliput/common/range_validator.h>
Include dependency graph for geometry.cc:

Namespaces

 maliput_sparse
 
 maliput_sparse::geometry
 
 maliput_sparse::geometry::utility
 

Typedefs

using OptDistance = std::optional< double >
 
using Segment3d = std::pair< Vector3, Vector3 >
 
using Segment2d = std::pair< Vector2, Vector2 >
 

Functions

LineString3d ComputeCenterline3d (const LineString3d &left, const LineString3d &right)
 Computes a 3-dimensional centerline out of the left and right line string. More...
 
template<typename CoordinateT = maliput::math::Vector3>
CoordinateT InterpolatedPointAtP (const LineString< CoordinateT > &line_string, double p, double tolerance)
 Returns the piecewise linearly interpolated point at the given distance and the distance from the beginning to the first point. More...
 
double GetSlopeAtP (const LineString3d &line_string, double p, double tolerance)
 Returns the slope of a line_string for a given p . More...
 
template<typename CoordinateT = maliput::math::Vector3>
BoundPointsResult GetBoundPointsAtP (const LineString< CoordinateT > &line_string, double p, double tolerance)
 Obtains the points that confines p in the line_string . More...
 
double Get2DHeadingAtP (const LineString3d &line_string, double p, double tolerance)
 Returns the heading of a line_string for a given p . More...
 
maliput::math::Vector2 Get2DTangentAtP (const LineString3d &line_string, double p, double tolerance)
 Returns the 2d-tangent of a line_string for a given p . More...
 
maliput::math::Vector3 GetTangentAtP (const LineString3d &line_string, double p, double tolerance)
 Returns the 3d-tangent of a line_string for a given p . More...
 
template<typename CoordinateT = maliput::math::Vector3>
ClosestPointToSegmentResult< CoordinateT > GetClosestPointToSegment (const CoordinateT &start_segment_point, const CoordinateT &end_segment_point, const CoordinateT &coordinate, double tolerance)
 Gets the closest point in the segment to the given xyz point. More...
 
ClosestPointResult3d GetClosestPoint (const LineString3d &line_string, const maliput::math::Vector3 &xyz, double tolerance)
 Gets the closest point in the line_string to the given xyz point. More...
 
ClosestPointResult3d GetClosestPointUsing2dProjection (const LineString3d &line_string, const maliput::math::Vector3 &xyz, double tolerance)
 Gets the closest point in the line_string to the given xyz point. More...
 
double ComputeDistance (const LineString3d &lhs, const LineString3d &rhs, double tolerance)
 Computes the distance between two LineString3d. More...
 
template maliput::math::Vector3 InterpolatedPointAtP (const LineString3d &, double, double)
 
template ClosestPointToSegmentResult3d GetClosestPointToSegment (const maliput::math::Vector3 &, const maliput::math::Vector3 &, const maliput::math::Vector3 &, double)
 
template ClosestPointToSegmentResult2d GetClosestPointToSegment (const maliput::math::Vector2 &, const maliput::math::Vector2 &, const maliput::math::Vector2 &, double)
 
template BoundPointsResult GetBoundPointsAtP< maliput::math::Vector3 > (const LineString3d &, double, double)
 

Variables

static constexpr bool kLeft {true}
 
static constexpr bool kRight {false}
 
static constexpr double kEpsilon {1e-12}