|
| STBoundary ()=default |
|
| STBoundary (const std::vector< std::pair< STPoint, STPoint >> &point_pairs, bool is_accurate_boundary=false) |
|
| STBoundary (const common::math::Box2d &box)=delete |
|
| STBoundary (std::vector< common::math::Vec2d > points)=delete |
|
| ~STBoundary ()=default |
| Default destructor. More...
|
|
bool | IsEmpty () const |
|
bool | GetUnblockSRange (const double curr_time, double *s_upper, double *s_lower) const |
|
bool | GetBoundarySRange (const double curr_time, double *s_upper, double *s_lower) const |
|
bool | GetBoundarySlopes (const double curr_time, double *ds_upper, double *ds_lower) const |
|
BoundaryType | boundary_type () const |
|
const std::string & | id () const |
|
double | characteristic_length () const |
|
void | set_id (const std::string &id) |
|
void | SetBoundaryType (const BoundaryType &boundary_type) |
|
void | SetCharacteristicLength (const double characteristic_length) |
|
double | min_s () const |
|
double | min_t () const |
|
double | max_s () const |
|
double | max_t () const |
|
std::vector< STPoint > | upper_points () const |
|
std::vector< STPoint > | lower_points () const |
|
bool | IsPointInBoundary (const STPoint &st_point) const |
|
STBoundary | ExpandByS (const double s) const |
|
STBoundary | ExpandByT (const double t) const |
|
STBoundary | CutOffByT (const double t) const |
|
STPoint | upper_left_point () const |
|
STPoint | upper_right_point () const |
|
STPoint | bottom_left_point () const |
|
STPoint | bottom_right_point () const |
|
void | set_upper_left_point (STPoint st_point) |
|
void | set_upper_right_point (STPoint st_point) |
|
void | set_bottom_left_point (STPoint st_point) |
|
void | set_bottom_right_point (STPoint st_point) |
|
void | set_obstacle_road_right_ending_t (double road_right_ending_t) |
|
double | obstacle_road_right_ending_t () const |
|
| Polygon2d ()=default |
| Empty constructor. More...
|
|
| Polygon2d (const Box2d &box) |
| Constructor which takes a box. More...
|
|
| Polygon2d (std::vector< Vec2d > points) |
| Constructor which takes a vector of points as its vertices. More...
|
|
const std::vector< Vec2d > & | points () const |
| Get the vertices of the polygon. More...
|
|
const std::vector< LineSegment2d > & | line_segments () const |
| Get the edges of the polygon. More...
|
|
int | num_points () const |
| Get the number of vertices of the polygon. More...
|
|
bool | is_convex () const |
| Check if the polygon is convex. More...
|
|
double | area () const |
| Get the area of the polygon. More...
|
|
double | DistanceToBoundary (const Vec2d &point) const |
| Compute the distance from a point to the boundary of the polygon. This distance is equal to the minimal distance from the point to the edges of the polygon. More...
|
|
double | DistanceTo (const Vec2d &point) const |
| Compute the distance from a point to the polygon. If the point is within the polygon, return 0. Otherwise, this distance is the minimal distance from the point to the edges of the polygon. More...
|
|
double | DistanceTo (const LineSegment2d &line_segment) const |
| Compute the distance from a line segment to the polygon. If the line segment is within the polygon, or it has intersect with the polygon, return 0. Otherwise, this distance is the minimal distance between the distances from the two ends of the line segment to the polygon. More...
|
|
double | DistanceTo (const Box2d &box) const |
| Compute the distance from a box to the polygon. If the box is within the polygon, or it has overlap with the polygon, return 0. Otherwise, this distance is the minimal distance among the distances from the edges of the box to the polygon. More...
|
|
double | DistanceTo (const Polygon2d &polygon) const |
| Compute the distance from another polygon to the polygon. If the other polygon is within this polygon, or it has overlap with this polygon, return 0. Otherwise, this distance is the minimal distance among the distances from the edges of the other polygon to this polygon. More...
|
|
double | DistanceSquareTo (const Vec2d &point) const |
| Compute the square of distance from a point to the polygon. If the point is within the polygon, return 0. Otherwise, this square of distance is the minimal square of distance from the point to the edges of the polygon. More...
|
|
bool | IsPointIn (const Vec2d &point) const |
| Check if a point is within the polygon. More...
|
|
bool | IsPointOnBoundary (const Vec2d &point) const |
| Check if a point is on the boundary of the polygon. More...
|
|
bool | Contains (const LineSegment2d &line_segment) const |
| Check if the polygon contains a line segment. More...
|
|
bool | Contains (const Polygon2d &polygon) const |
| Check if the polygon contains another polygon. More...
|
|
bool | HasOverlap (const LineSegment2d &line_segment) const |
| Check if a line segment has overlap with this polygon. More...
|
|
bool | GetOverlap (const LineSegment2d &line_segment, Vec2d *const first, Vec2d *const last) const |
| Get the overlap of a line segment and this polygon. If they have overlap, output the two ends of the overlapped line segment. More...
|
|
void | GetAllVertices (std::vector< Vec2d > *const vertices) const |
| Get all vertices of the polygon. More...
|
|
std::vector< Vec2d > | GetAllVertices () const |
| Get all vertices of the polygon. More...
|
|
std::vector< LineSegment2d > | GetAllOverlaps (const LineSegment2d &line_segment) const |
| Get all overlapped line segments of a line segment and this polygon. There are possibly multiple overlapped line segments if this polygon is not convex. More...
|
|
bool | HasOverlap (const Polygon2d &polygon) const |
| Check if this polygon has overlap with another polygon. More...
|
|
bool | ComputeOverlap (const Polygon2d &other_polygon, Polygon2d *const overlap_polygon) const |
| Compute the overlap of this polygon and the other polygon if any. Note: this function only works for computing overlap between two convex polygons. More...
|
|
double | ComputeIoU (const Polygon2d &other_polygon) const |
| Compute intersection over union ratio of this polygon and the other polygon. Note: this function only works for computing overlap between two convex polygons. More...
|
|
AABox2d | AABoundingBox () const |
| Get the axis-aligned bound box of the polygon. More...
|
|
Box2d | BoundingBoxWithHeading (const double heading) const |
| Get the bound box according to a heading. More...
|
|
Box2d | MinAreaBoundingBox () const |
| Get the bounding box with the minimal area. More...
|
|
void | ExtremePoints (const double heading, Vec2d *const first, Vec2d *const last) const |
| Get the extreme points along a heading direction. More...
|
|
Polygon2d | ExpandByDistance (const double distance) const |
| Expand this polygon by a distance. More...
|
|
std::string | DebugString () const |
| Get a string containing essential information about the polygon for debugging purpose. More...
|
|
double | min_x () const |
|
double | max_x () const |
|
double | min_y () const |
|
double | max_y () const |
|