ad_rss
Namespaces | Typedefs | Functions
Geometry.hpp File Reference
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <sstream>
#include "ad/physics/AngleOperation.hpp"
#include "ad/physics/Distance.hpp"
#include "ad/rss/state/HeadingRange.hpp"
#include "ad/rss/world/UnstructuredTrajectorySet.hpp"
Include dependency graph for Geometry.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ad
 namespace ad
 
 ad::rss
 namespace rss
 
 ad::rss::unstructured
 namespace unstructured
 

Typedefs

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

Functions

Point ad::rss::unstructured::toPoint (ad::physics::Distance2D const &distance)
 create a Point from a Distance2D More...
 
Point ad::rss::unstructured::toPoint (ad::physics::Distance const &distanceX, ad::physics::Distance const &distanceY)
 create a Point from two Distance components More...
 
ad::physics::Distance2D ad::rss::unstructured::toDistance (Point const &point)
 convert a Point to a Distance2D More...
 
void ad::rss::unstructured::toPolygon (world::UnstructuredTrajectorySet const &trajectorySet, Polygon &polygon)
 convert a trajectory set to a polygon More...
 
void ad::rss::unstructured::toTrajectorySet (Polygon const &polygon, world::UnstructuredTrajectorySet &trajectorySet)
 convert a polygon to a trajectory set More...
 
bool ad::rss::unstructured::isInsideHeadingRange (ad::physics::Angle const &angle, state::HeadingRange const &range)
 check if an angle is within a range More...
 
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 More...
 
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 More...
 
Point ad::rss::unstructured::rotateAroundPoint (Point const &origin, Point const &relativePoint, ad::physics::Angle const &angle)
 rotate a point around another point More...
 
Point ad::rss::unstructured::getPointOnCircle (Point const &origin, ad::physics::Distance const &radius, ad::physics::Angle const &angle)
 calculate a point on a circle More...
 
Point ad::rss::unstructured::getCircleOrigin (Point const &point, ad::physics::Distance const &radius, ad::physics::Angle const &angle)
 calculate the circle origin More...
 
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 More...
 
bool ad::rss::unstructured::collides (world::UnstructuredTrajectorySet const &trajectorySet1, world::UnstructuredTrajectorySet const &trajectorySet2)
 check if two trajectory sets collide More...
 
bool ad::rss::unstructured::combinePolygon (Polygon const &a, Polygon const &b, Polygon &result)
 Combine two polygons. More...
 
ad::rss::unstructured::Point operator+ (ad::rss::unstructured::Point const &a, ad::rss::unstructured::Point const &b)
 Point operation: vector addition. More...
 
ad::rss::unstructured::Point operator- (ad::rss::unstructured::Point const &a, ad::rss::unstructured::Point const &b)
 Point operation: vector subtraction. More...
 
bool operator== (ad::rss::unstructured::Point const &a, ad::rss::unstructured::Point const &b)
 comparison operation: Point More...
 
bool operator!= (ad::rss::unstructured::Point const &a, ad::rss::unstructured::Point const &b)
 comparison operation: Points not equal More...
 
std::string std::to_string (ad::rss::unstructured::Point const &value)
 to_string overload for Point More...
 
std::string std::to_string (ad::rss::unstructured::Polygon const &value)
 to_string overload for Polygon More...
 
std::string std::to_string (ad::rss::unstructured::Line value)
 to_string overload for Line More...
 

Function Documentation

◆ operator!=()

bool operator!= ( ad::rss::unstructured::Point const &  a,
ad::rss::unstructured::Point const &  b 
)
inline

comparison operation: Points not equal

Parameters
[in]apoint a
[in]bpoint b
Returns
a != b

◆ operator+()

ad::rss::unstructured::Point operator+ ( ad::rss::unstructured::Point const &  a,
ad::rss::unstructured::Point const &  b 
)
inline

Point operation: vector addition.

Parameters
[in]apoint a
[in]bpoint b
Returns
c = a + b

◆ operator-()

ad::rss::unstructured::Point operator- ( ad::rss::unstructured::Point const &  a,
ad::rss::unstructured::Point const &  b 
)
inline

Point operation: vector subtraction.

Parameters
[in]apoint a
[in]bpoint b
Returns
c = a - b

◆ operator==()

bool operator== ( ad::rss::unstructured::Point const &  a,
ad::rss::unstructured::Point const &  b 
)
inline

comparison operation: Point

Parameters
[in]apoint a
[in]bpoint b
Returns
a == b

◆ to_string() [1/3]

std::string std::to_string ( ad::rss::unstructured::Line  value)
inline

to_string overload for Line

Parameters
[in]valuea line
Returns
string describing line

◆ to_string() [2/3]

std::string std::to_string ( ad::rss::unstructured::Point const &  value)
inline

to_string overload for Point

Parameters
[in]valuea point
Returns
string describing point

◆ to_string() [3/3]

std::string std::to_string ( ad::rss::unstructured::Polygon const &  value)
inline

to_string overload for Polygon

Parameters
[in]valuea polygon
Returns
string describing polygon