Autoware.Auto
autoware::common::geometry::details Namespace Reference

Contains computation geometry functions not intended for the end user to directly use. More...

Typedefs

using Line = std::pair< Point, Point >
 Alias for a std::pair of two points. More...
 

Functions

template<typename IT >
IT circular_next (const IT begin, const IT end, const IT current) noexcept
 
template<typename PointT , typename HullT >
void form_lower_hull (std::list< PointT > &points, std::list< HullT > &hull)
 Moves points comprising the lower convex hull from points to hull. More...
 
template<typename PointT , typename HullT >
void form_upper_hull (std::list< PointT > &points, std::list< HullT > &hull)
 Moves points comprising the lower convex hull from points to hull. More...
 
template<typename PointT >
std::list< PointT >::const_iterator convex_hull_impl (std::list< PointT > &list)
 A static memory implementation of convex hull computation. Shuffles points around the deque such that the points of the convex hull of the deque of points are first in the deque, with the internal points following in an unspecified order. The head of the deque will be the point with the smallest x value, with the other points following in a counter-clockwise manner (from a top down view/facing -z direction) More...
 
template<typename Iter >
std::vector< Lineget_sorted_face_list (const Iter start, const Iter end)
 Compute a sorted list of faces of a polyhedron given a list of points. More...
 
template<template< typename ... > class Iterable1T, template< typename ... > class Iterable2T, typename PointT >
void append_contained_points (const Iterable1T< PointT > &external, const Iterable2T< PointT > &internal, std::list< PointT > &result)
 Append points of the polygon internal that are contained in the polygon exernal. More...
 
template<template< typename ... > class Iterable1T, template< typename ... > class Iterable2T, typename PointT >
void append_intersection_points (const Iterable1T< PointT > &polygon1, const Iterable2T< PointT > &polygon2, std::list< PointT > &result)
 Append the intersecting points between two polygons into the output list. More...
 

Detailed Description

Contains computation geometry functions not intended for the end user to directly use.

Typedef Documentation

◆ Line

Alias for a std::pair of two points.

Function Documentation

◆ append_contained_points()

template<template< typename ... > class Iterable1T, template< typename ... > class Iterable2T, typename PointT >
void autoware::common::geometry::details::append_contained_points ( const Iterable1T< PointT > &  external,
const Iterable2T< PointT > &  internal,
std::list< PointT > &  result 
)

Append points of the polygon internal that are contained in the polygon exernal.

◆ append_intersection_points()

template<template< typename ... > class Iterable1T, template< typename ... > class Iterable2T, typename PointT >
void autoware::common::geometry::details::append_intersection_points ( const Iterable1T< PointT > &  polygon1,
const Iterable2T< PointT > &  polygon2,
std::list< PointT > &  result 
)

Append the intersecting points between two polygons into the output list.

◆ circular_next()

template<typename IT >
IT autoware::common::geometry::details::circular_next ( const IT  begin,
const IT  end,
const IT  current 
)
noexcept

◆ convex_hull_impl()

template<typename PointT >
std::list<PointT>::const_iterator autoware::common::geometry::details::convex_hull_impl ( std::list< PointT > &  list)

A static memory implementation of convex hull computation. Shuffles points around the deque such that the points of the convex hull of the deque of points are first in the deque, with the internal points following in an unspecified order. The head of the deque will be the point with the smallest x value, with the other points following in a counter-clockwise manner (from a top down view/facing -z direction)

Parameters
[in,out]listA list of nodes that will be pruned down and reordered into a ccw convex hull
Returns
An iterator pointing to one after the last point contained in the hull
Template Parameters
PointTType of a point, must have x and y float members

◆ form_lower_hull()

template<typename PointT , typename HullT >
void autoware::common::geometry::details::form_lower_hull ( std::list< PointT > &  points,
std::list< HullT > &  hull 
)

Moves points comprising the lower convex hull from points to hull.

Parameters
[in,out]pointsA list of points, assumed to be sorted in lexical order
[in,out]hullAn empty list of points, assumed to have same allocator as points (for splice)
Template Parameters
PointTThe point type for the points list
HullTthe point type for the hull list

◆ form_upper_hull()

template<typename PointT , typename HullT >
void autoware::common::geometry::details::form_upper_hull ( std::list< PointT > &  points,
std::list< HullT > &  hull 
)

Moves points comprising the lower convex hull from points to hull.

Parameters
[in,out]pointsA list of points, assumed to be sorted in lexical order, and to contain the leftmost point
[in,out]hullA list of points, assumed to have same allocator as points (for splice), and to contain the lower hull (minus the left-most point)
Template Parameters
PointTThe point type for the points list
HullTthe point type for the hull list

◆ get_sorted_face_list()

template<typename Iter >
std::vector<Line> autoware::common::geometry::details::get_sorted_face_list ( const Iter  start,
const Iter  end 
)

Compute a sorted list of faces of a polyhedron given a list of points.

Template Parameters
Iter1Iterator over point-types that must have point adapters
Parameters
[in]startStart iterator of the list of points
[in]endEnd iterator of the list of points
Returns
The list of faces