|
Autoware.Auto
|
|
This is the class which represents the cars as rectangles in 2D and defines the function intersect_with_line which gives the intersection points of the rectangle with the line. More...
#include <shapes.hpp>
Public Member Functions | |
| Rectangle (const Eigen::Vector2f ¢er, const Eigen::Vector2f &size, const autoware::common::types::float32_t orientation_degrees) | |
| constructor More... | |
| EigenStlVector< Eigen::Vector2f > | intersect_with_line (const Line &line, const autoware::common::types::bool8_t closest_point_only) const override |
| Method to get intersection points with rectangle and the input line. More... | |
Public Member Functions inherited from autoware::tracking_test_framework::Shape | |
| virtual | ~Shape ()=default |
| Virtual destructor. More... | |
This is the class which represents the cars as rectangles in 2D and defines the function intersect_with_line which gives the intersection points of the rectangle with the line.
| autoware::tracking_test_framework::Rectangle::Rectangle | ( | const Eigen::Vector2f & | center, |
| const Eigen::Vector2f & | size, | ||
| const autoware::common::types::float32_t | orientation_degrees | ||
| ) |
constructor
|
overridevirtual |
Method to get intersection points with rectangle and the input line.
| [in] | line | the Line object |
| [in] | closest_point_only | the boolean to determine if closest intersection to be returned or all |
We can pass the rectangle borders to the Line::intersect_with_line function one by one to see if the line is intersecting any of the 4 sides of the rectangle and get the intersection points if any from there.
Implements autoware::tracking_test_framework::Shape.