|
Autoware.Auto
|
|
This is the class which represents the line and defines the function intersect_with_line which gives the intersection points with another line. More...
#include <shapes.hpp>
Public Member Functions | |
| Line ()=default | |
| default constructor More... | |
| Line (const Eigen::Vector2f &start, const Eigen::Vector2f &end) | |
| 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 of a line with another line. More... | |
| Eigen::Vector2f | get_point (const autoware::common::types::float32_t scale) const |
| gets the point on the line at the input scale More... | |
| const Eigen::Vector2f & | starting_point () const |
| gets the starting point of the line More... | |
| const Eigen::Vector2f & | end_point () const |
| gets the end point of the line More... | |
| const Eigen::Vector2f & | direction () const |
| gets the line direction More... | |
| const autoware::common::types::float32_t & | length () const |
| gets the line length More... | |
Public Member Functions inherited from autoware::tracking_test_framework::Shape | |
| virtual | ~Shape ()=default |
| Virtual destructor. More... | |
This is the class which represents the line and defines the function intersect_with_line which gives the intersection points with another line.
|
default |
default constructor
| autoware::tracking_test_framework::Line::Line | ( | const Eigen::Vector2f & | start, |
| const Eigen::Vector2f & | end | ||
| ) |
constructor
|
inline |
gets the line direction
|
inline |
gets the end point of the line
| Eigen::Vector2f autoware::tracking_test_framework::Line::get_point | ( | const autoware::common::types::float32_t | scale | ) | const |
gets the point on the line at the input scale
| [in] | scale | the scalar qty t representing the scaling factor for the line in equation : \((p = p^ + t.d)\) where \((p^)\) is the unit vector for starting point of the line and \((d)\) is the direction unit vector. if \((||d|| == 1)\) then the scale becomes a signed distance along the line |
|
overridevirtual |
Method to get intersection points of a line with another line.
| [in] | line | the Line object |
| [in] | closest_point_only | the boolean to determine if closest intersection to be returned or all |
If we represent two lines in the form of: \((𝑝_1 = \hat{𝑝_1} + 𝑡_1⋅𝑑_1)\) \((𝑝_2 = \hat{𝑝_2} + 𝑡_2⋅𝑑_2)\) where \((𝑝_1)\) and \((𝑝_2)\) are arbitrary points on the given lines, \((\hat{𝑝_1})\) and \((\hat{𝑝_2})\) are the starting points of the lines, \((𝑡_1)\) and \((𝑡_2)\) are scalar scaling parameters that scale the corresponding direction unit vectors \((𝑑_1)\) and \((𝑑_2)\) , thus defining any point on the line.
Implements autoware::tracking_test_framework::Shape.
|
inline |
gets the line length
|
inline |
gets the starting point of the line