|
Thunderbots Project
|
#include <obstacle.hpp>

Public Member Functions | |
| virtual bool | contains (const Point &p, const double t_sec=0) const =0 |
| virtual double | distance (const Point &p, const double t_sec=0) const =0 |
| virtual double | signedDistance (const Point &point, const double t_sec=0) const =0 |
| virtual bool | intersects (const Segment &segment, const double t_sec=0) const =0 |
| virtual Point | closestPoint (const Point &p) const =0 |
| virtual std::vector< Point > | rasterize (const double resolution_size) const =0 |
| virtual TbotsProto::Obstacle | createObstacleProto () const =0 |
| virtual Rectangle | axisAlignedBoundingBox (const double inflation_radius) const =0 |
| virtual std::string | toString (void) const =0 |
| virtual void | accept (ObstacleVisitor &visitor) const =0 |
An obstacle is an area to avoid for navigation
|
pure virtual |
Accepts an Obstacle Visitor and calls the visit function
| visitor | An Obstacle Visitor |
Implemented in GeomObstacle< GEOM_TYPE >.
|
pure virtual |
Create the axis aligned bounding box for this obstacle
| inflation_radius | The radius to inflate the obstacle by before creating the AABB |
Implemented in GeomObstacle< GEOM_TYPE >.
Finds the Point closest to the given Point that is outside of the obstacle.
| p | the point. |
Implemented in GeomObstacle< GEOM_TYPE >.
|
pure virtual |
Determines whether the given Point is contained within this Obstacle
| p | Point to check if contained by obstacle |
| t_sec | Time in seconds into the future to check if point is contained. |
Implemented in ConstVelocityObstacle< GEOM_TYPE >, GeomObstacle< GEOM_TYPE >, and TrajectoryObstacle< GEOM_TYPE >.
|
pure virtual |
Creates an obstacle proto representation
Implemented in GeomObstacle< GEOM_TYPE >.
|
pure virtual |
Gets the minimum distance from the obstacle to the point
Implemented in ConstVelocityObstacle< GEOM_TYPE >, GeomObstacle< GEOM_TYPE >, and TrajectoryObstacle< GEOM_TYPE >.
|
pure virtual |
Determines whether the given Segment intersects this Obstacle
| segment | Segment to check if intersects with this Obstacle |
| t_sec | Time in seconds into the future to check if segment intersects. |
Implemented in ConstVelocityObstacle< GEOM_TYPE >, GeomObstacle< GEOM_TYPE >, and TrajectoryObstacle< GEOM_TYPE >.
|
pure virtual |
Determines what coordinates on the field are blocked by this Obstacle
| resolution_size | The minimum size of the grid cells to rasterize the obstacle into |
Implemented in GeomObstacle< GEOM_TYPE >.
|
pure virtual |
Gets the signed distance from the obstacle's perimeter to the point. That is, if point is inside the obstacle then distance will be negative. See https://iquilezles.org/articles/distfunctions2d/ for details on the maths
Implemented in ConstVelocityObstacle< GEOM_TYPE >, GeomObstacle< GEOM_TYPE >, and TrajectoryObstacle< GEOM_TYPE >.
|
pure virtual |
Output string to describe the obstacle
Implemented in GeomObstacle< GEOM_TYPE >.