ad_rss
Classes | Typedefs | Functions
ad::rss::unstructured Namespace Reference

namespace unstructured More...

Classes

class  DebugDrawing
 

Typedefs

typedef boost::geometry::model::d2::point_xy< double > Point
 
typedef boost::geometry::model::linestring< Point > Line
 
typedef boost::geometry::model::polygon< Point, false > Polygon
 
typedef boost::geometry::model::multi_point< Point > MultiPoint
 

Functions

Point toPoint (ad::physics::Distance2D const &distance)
 create a Point from a Distance2D More...
 
Point toPoint (ad::physics::Distance const &distanceX, ad::physics::Distance const &distanceY)
 create a Point from two Distance components More...
 
ad::physics::Distance2D toDistance (Point const &point)
 convert a Point to a Distance2D More...
 
void toPolygon (world::UnstructuredTrajectorySet const &trajectorySet, Polygon &polygon)
 convert a trajectory set to a polygon More...
 
void toTrajectorySet (Polygon const &polygon, world::UnstructuredTrajectorySet &trajectorySet)
 convert a polygon to a trajectory set More...
 
bool isInsideHeadingRange (ad::physics::Angle const &angle, state::HeadingRange const &range)
 check if an angle is within a range More...
 
bool getHeadingOverlap (state::HeadingRange const &a, state::HeadingRange const &b, std::vector< state::HeadingRange > &overlapRanges)
 get the overlap between two angle ranges More...
 
bool getHeadingOverlap (state::HeadingRange const &headingRange, std::vector< state::HeadingRange > &overlapRanges)
 get the overlap between an angle range and a heading range More...
 
Point rotateAroundPoint (Point const &origin, Point const &relativePoint, ad::physics::Angle const &angle)
 rotate a point around another point More...
 
Point getPointOnCircle (Point const &origin, ad::physics::Distance const &radius, ad::physics::Angle const &angle)
 calculate a point on a circle More...
 
Point getCircleOrigin (Point const &point, ad::physics::Distance const &radius, ad::physics::Angle const &angle)
 calculate the circle origin More...
 
template<typename T >
void calculateCircleArc (Point origin, ad::physics::Distance const &radius, ad::physics::Angle const &from, ad::physics::Angle const &delta, ad::physics::Angle const &stepWidth, T &geometry)
 calculate points on a circle arc More...
 
bool collides (world::UnstructuredTrajectorySet const &trajectorySet1, world::UnstructuredTrajectorySet const &trajectorySet2)
 check if two trajectory sets collide More...
 
bool combinePolygon (Polygon const &a, Polygon const &b, Polygon &result)
 Combine two polygons. More...
 

Detailed Description

namespace unstructured

Function Documentation

◆ calculateCircleArc()

template<typename T >
void ad::rss::unstructured::calculateCircleArc ( Point  origin,
ad::physics::Distance const &  radius,
ad::physics::Angle const &  from,
ad::physics::Angle const &  delta,
ad::physics::Angle const &  stepWidth,
T &  geometry 
)

calculate points on a circle arc

Parameters
[in]originabsolute origin
[in]radiusradius of circle
[in]fromstarting angle
[in]deltaangle of the arc
[out]geometrygeometry the calculated points are added to

◆ collides()

bool ad::rss::unstructured::collides ( world::UnstructuredTrajectorySet const &  trajectorySet1,
world::UnstructuredTrajectorySet const &  trajectorySet2 
)

check if two trajectory sets collide

Parameters
[in]trajectorySet1first trajectory set
[in]trajectorySet2second trajectory set
Returns
true if trajectory sets collide, otherwise false

◆ combinePolygon()

bool ad::rss::unstructured::combinePolygon ( Polygon const &  a,
Polygon const &  b,
Polygon &  result 
)

Combine two polygons.

Parameters
[in]apolygon a
[in]bpolygon b
[out]resultresulting polygon
Returns
false if a failure occurred during calculations, true otherwise

◆ getCircleOrigin()

Point ad::rss::unstructured::getCircleOrigin ( Point const &  point,
ad::physics::Distance const &  radius,
ad::physics::Angle const &  angle 
)

calculate the circle origin

Parameters
[in]pointpoint on circle
[in]radiusradius of circle
[in]anglecircle angle for point
Returns
circle origin

◆ getHeadingOverlap() [1/2]

bool ad::rss::unstructured::getHeadingOverlap ( state::HeadingRange const &  a,
state::HeadingRange const &  b,
std::vector< state::HeadingRange > &  overlapRanges 
)

get the overlap between two angle ranges

Parameters
[in]afirst heading range
[in]bsecond heading range
[out]overlapRangeoverlapping heading ranges
Returns
true if overlap exists, otherwise false

◆ getHeadingOverlap() [2/2]

bool ad::rss::unstructured::getHeadingOverlap ( state::HeadingRange const &  headingRange,
std::vector< state::HeadingRange > &  overlapRanges 
)

get the overlap between an angle range and a heading range

Parameters
[in]headingRangeangle range
[in,out]overlapRangesoverlapping heading ranges
Returns
true if overlap exists, otherwise false

◆ getPointOnCircle()

Point ad::rss::unstructured::getPointOnCircle ( Point const &  origin,
ad::physics::Distance const &  radius,
ad::physics::Angle const &  angle 
)

calculate a point on a circle

Parameters
[in]originabsolute origin
[in]radiusradius of circle
[in]angleangle to rotate the point
Returns
resulting point

◆ isInsideHeadingRange()

bool ad::rss::unstructured::isInsideHeadingRange ( ad::physics::Angle const &  angle,
state::HeadingRange const &  range 
)

check if an angle is within a range

Parameters
[in]angleangle to check
[in]rangeheading range
Returns
true if inside angle range, otherwise false

◆ rotateAroundPoint()

Point ad::rss::unstructured::rotateAroundPoint ( Point const &  origin,
Point const &  relativePoint,
ad::physics::Angle const &  angle 
)

rotate a point around another point

Parameters
[in]originabsolute origin
[in]relativePointpoint to rotate, relative to origin
[in]angleangle to rotate the point
Returns
rotated point

◆ toDistance()

ad::physics::Distance2D ad::rss::unstructured::toDistance ( Point const &  point)
inline

convert a Point to a Distance2D

Parameters
[in]pointpoint to convert
Returns
distance

◆ toPoint() [1/2]

Point ad::rss::unstructured::toPoint ( ad::physics::Distance const &  distanceX,
ad::physics::Distance const &  distanceY 
)
inline

create a Point from two Distance components

Parameters
[in]distanceXx component of distance
[in]distanceYy component of distance
Returns
point

◆ toPoint() [2/2]

Point ad::rss::unstructured::toPoint ( ad::physics::Distance2D const &  distance)
inline

create a Point from a Distance2D

Parameters
[in]distancedistance to convert
Returns
point

◆ toPolygon()

void ad::rss::unstructured::toPolygon ( world::UnstructuredTrajectorySet const &  trajectorySet,
Polygon &  polygon 
)

convert a trajectory set to a polygon

Parameters
[in]trajectorySettrajectory set to convert
[out]polygonconverted polygon

◆ toTrajectorySet()

void ad::rss::unstructured::toTrajectorySet ( Polygon const &  polygon,
world::UnstructuredTrajectorySet trajectorySet 
)

convert a polygon to a trajectory set

Parameters
[in]polygonpolygon to convert
[out]trajectorySetconverted trajectory set