|
LARS
LARS (Light Augmented Reality System) is an open-source framework for light-based interaction and real-time tracking in multi-robot experiments. Inspired by ARK, LARS extends the augmented reality paradigm to robotic collectives by projecting dynamic visual cues and environments onto the arena, enabling new experimental possibilities for collective robotics research, education, and outreach. LARS features integrated tracking, light projection, and modular experiment control with a user-friendly Qt GUI.
|
2d segment line class More...
#include <segment_2d.h>
Public Member Functions | |
| Segment2D (const Vector2D &origin, const Vector2D &terminal) | |
| construct from 2 points | |
| Segment2D (const double &origin_x, const double &origin_y, const double &terminal_x, const double &terminal_y) | |
| construct directly using raw coordinate values | |
| Segment2D (const Vector2D &origin, const double &length, const AngleDeg &dir) | |
| construct using origin, direction and length | |
| const Segment2D & | assign (const Vector2D &origin, const Vector2D &terminal) |
| construct from 2 points | |
| const Segment2D & | assign (const double &origin_x, const double &origin_y, const double &terminal_x, const double &terminal_y) |
| construct directly using raw coordinate values | |
| const Segment2D & | assign (const Vector2D &origin, const double &length, const AngleDeg &dir) |
| construct using origin, direction and length | |
| bool | isValid () const |
| check if this line segment is valid or not. origin's coodinates value have to be different from terminal's one. | |
| const Vector2D & | origin () const |
| get 1st point of segment edge | |
| const Vector2D & | terminal () const |
| get 2nd point of segment edge | |
| Line2D | line () const |
| get line generated from segment | |
| double | length () const |
| get the length of this segment | |
| AngleDeg | direction () const |
| get the direction angle of this line segment | |
| const Segment2D & | swap () |
| swap segment edge point | |
| const Segment2D & | reverse () |
| swap segment edge point. This method is equivalent to swap(), provided for convenience. | |
| Segment2D | reversedSegment () const |
| get the reversed line segment. | |
| Line2D | perpendicularBisector () const |
| make perpendicular bisector line from segment points | |
| bool | contains (const Vector2D &p) const |
| check if the point is within the rectangle defined by this segment as a diagonal line. | |
| bool | equals (const Segment2D &other) const |
| check if this line segment has completely same value as input line segment. | |
| bool | equalsWeakly (const Segment2D &other) const |
| check if this line segment has weakly same value as input line segment. | |
| Vector2D | projection (const Vector2D &p) const |
| calculates projection point from p | |
| Vector2D | intersection (const Segment2D &other, const bool allow_end_point) const |
| check & get the intersection point with other line segment | |
| Vector2D | intersection (const Line2D &l) const |
| check & get the intersection point with other line | |
| bool | existIntersection (const Segment2D &other) const |
| check if segments cross each other or not. | |
| bool | intersects (const Segment2D &other) const |
| check if segments cross each other or not. | |
| bool | existIntersectionExceptEndpoint (const Segment2D &other) const |
| check if segments intersect each other on non terminal point. | |
| bool | intersectsExceptEndpoint (const Segment2D &other) const |
| check if segments intersect each other on non terminal point. | |
| bool | existIntersection (const Line2D &l) const |
| check if this line segment intersects with target line. | |
| bool | intersects (const Line2D &l) const |
| check if this line segment intersects with target line. | |
| Vector2D | nearestPoint (const Vector2D &p) const |
| get a point on segment where distance of point is minimal. | |
| double | dist (const Vector2D &p) const |
| get minimum distance between this segment and point | |
| double | dist (const Segment2D &seg) const |
| get minimum distance between 2 segments | |
| double | farthestDist (const Vector2D &p) const |
| get maximum distance between this segment and point | |
| bool | onSegment (const Vector2D &p) const |
| strictly check if point is on segment or not | |
| bool | onSegmentWeakly (const Vector2D &p) const |
| weakly check if point is on segment or not | |
| std::ostream & | print (std::ostream &os) const |
| print data to an output stream. | |
2d segment line class
construct from 2 points
| origin | 1st point of segment edge |
| terminal | 2nd point of segment edge |
|
inline |
construct directly using raw coordinate values
| origin_x | 1st point x value of segment edge |
| origin_y | 1st point x value of segment edge |
| terminal_x | 2nd point y value of segment edge |
| terminal_y | 2nd point y value of segment edge |
|
inline |
construct using origin, direction and length
| origin | origin point |
| length | length of line segment |
| dir | line direction from origin point |
|
inline |
construct directly using raw coordinate values
| origin_x | 1st point x value of segment edge |
| origin_y | 1st point x value of segment edge |
| terminal_x | 2nd point y value of segment edge |
| terminal_y | 2nd point y value of segment edge |
|
inline |
construct using origin, direction and length
| origin | origin point |
| length | length of line segment |
| dir | line direction from origin point |
|
inline |
construct from 2 points
| origin | first point |
| terminal | second point |
|
inline |
check if the point is within the rectangle defined by this segment as a diagonal line.
|
inline |
get the direction angle of this line segment
| double rcsc::Segment2D::dist | ( | const Segment2D & | seg | ) | const |
get minimum distance between 2 segments
| seg | segment |
| double rcsc::Segment2D::dist | ( | const Vector2D & | p | ) | const |
get minimum distance between this segment and point
| p | point |
|
inline |
check if this line segment has completely same value as input line segment.
| other | compared object. |
|
inline |
check if this line segment has weakly same value as input line segment.
| other | compared object. |
| bool rcsc::Segment2D::existIntersection | ( | const Line2D & | l | ) | const |
check if this line segment intersects with target line.
| l | checked line |
| bool rcsc::Segment2D::existIntersection | ( | const Segment2D & | other | ) | const |
check if segments cross each other or not.
| other | segment for cross checking |
| bool rcsc::Segment2D::existIntersectionExceptEndpoint | ( | const Segment2D & | other | ) | const |
check if segments intersect each other on non terminal point.
| other | segment for cross checking |
| double rcsc::Segment2D::farthestDist | ( | const Vector2D & | p | ) | const |
get maximum distance between this segment and point
| p | point |
check & get the intersection point with other line
| l | checked line object |
| Vector2D rcsc::Segment2D::intersection | ( | const Segment2D & | other, |
| const bool | allow_end_point ) const |
check & get the intersection point with other line segment
| other | checked line segment |
| allow_end_point | if this value is false, an end point is disallowed as an intersection. |
|
inline |
check if this line segment intersects with target line.
| l | checked line |
|
inline |
check if segments cross each other or not.
| other | segment for cross checking |
|
inline |
check if segments intersect each other on non terminal point.
| other | segment for cross checking |
|
inline |
check if this line segment is valid or not. origin's coodinates value have to be different from terminal's one.
|
inline |
get the length of this segment
|
inline |
get line generated from segment
get a point on segment where distance of point is minimal.
| p | point |
| bool rcsc::Segment2D::onSegment | ( | const Vector2D & | p | ) | const |
strictly check if point is on segment or not
| p | checked point |
| bool rcsc::Segment2D::onSegmentWeakly | ( | const Vector2D & | p | ) | const |
weakly check if point is on segment or not
| p | checked point |
|
inline |
get 1st point of segment edge
|
inline |
make perpendicular bisector line from segment points
|
inline |
print data to an output stream.
| os | reference to the output stream |
calculates projection point from p
| p | input point |
|
inline |
swap segment edge point. This method is equivalent to swap(), provided for convenience.
|
inline |
get the reversed line segment.
|
inline |
swap segment edge point
|
inline |
get 2nd point of segment edge