ad_rss
|
namespace unstructured More...
Classes | |
class | DebugDrawing |
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... | |
namespace unstructured
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
[in] | origin | absolute origin |
[in] | radius | radius of circle |
[in] | from | starting angle |
[in] | delta | angle of the arc |
[out] | geometry | geometry the calculated points are added to |
bool ad::rss::unstructured::collides | ( | world::UnstructuredTrajectorySet const & | trajectorySet1, |
world::UnstructuredTrajectorySet const & | trajectorySet2 | ||
) |
check if two trajectory sets collide
[in] | trajectorySet1 | first trajectory set |
[in] | trajectorySet2 | second trajectory set |
bool ad::rss::unstructured::combinePolygon | ( | Polygon const & | a, |
Polygon const & | b, | ||
Polygon & | result | ||
) |
Combine two polygons.
[in] | a | polygon a |
[in] | b | polygon b |
[out] | result | resulting polygon |
Point ad::rss::unstructured::getCircleOrigin | ( | Point const & | point, |
ad::physics::Distance const & | radius, | ||
ad::physics::Angle const & | angle | ||
) |
calculate the circle origin
[in] | point | point on circle |
[in] | radius | radius of circle |
[in] | angle | circle angle for point |
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
[in] | a | first heading range |
[in] | b | second heading range |
[out] | overlapRange | overlapping heading ranges |
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
[in] | headingRange | angle range |
[in,out] | overlapRanges | overlapping heading ranges |
Point ad::rss::unstructured::getPointOnCircle | ( | Point const & | origin, |
ad::physics::Distance const & | radius, | ||
ad::physics::Angle const & | angle | ||
) |
calculate a point on a circle
[in] | origin | absolute origin |
[in] | radius | radius of circle |
[in] | angle | angle to rotate the point |
bool ad::rss::unstructured::isInsideHeadingRange | ( | ad::physics::Angle const & | angle, |
state::HeadingRange const & | range | ||
) |
check if an angle is within a range
[in] | angle | angle to check |
[in] | range | heading range |
Point ad::rss::unstructured::rotateAroundPoint | ( | Point const & | origin, |
Point const & | relativePoint, | ||
ad::physics::Angle const & | angle | ||
) |
rotate a point around another point
[in] | origin | absolute origin |
[in] | relativePoint | point to rotate, relative to origin |
[in] | angle | angle to rotate the point |
|
inline |
convert a Point to a Distance2D
[in] | point | point to convert |
|
inline |
create a Point from two Distance components
[in] | distanceX | x component of distance |
[in] | distanceY | y component of distance |
|
inline |
create a Point from a Distance2D
[in] | distance | distance to convert |
void ad::rss::unstructured::toPolygon | ( | world::UnstructuredTrajectorySet const & | trajectorySet, |
Polygon & | polygon | ||
) |
convert a trajectory set to a polygon
[in] | trajectorySet | trajectory set to convert |
[out] | polygon | converted polygon |
void ad::rss::unstructured::toTrajectorySet | ( | Polygon const & | polygon, |
world::UnstructuredTrajectorySet & | trajectorySet | ||
) |
convert a polygon to a trajectory set
[in] | polygon | polygon to convert |
[out] | trajectorySet | converted trajectory set |