|
LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
|
2d straight line class More...
#include <line_2d.h>
Public Member Functions | |
| Line2D (const double a, const double b, const double c) | |
| construct directly More... | |
| Line2D (const Vector2D &p1, const Vector2D &p2) | |
| construct from 2 points More... | |
| Line2D (const Vector2D &origin, const AngleDeg &linedir) | |
| construct from origin point + direction More... | |
| const Line2D & | assign (const Vector2D &p1, const Vector2D &p2) |
| construct from 2 points More... | |
| const Line2D & | assign (const Vector2D &origin, const AngleDeg &linedir) |
| construct from origin point + direction More... | |
| double | a () const |
| accessor More... | |
| double | b () const |
| accessor More... | |
| double | c () const |
| accessor More... | |
| double | getX (const double y) const |
| get X-coordinate correspond to 'y' More... | |
| double | getY (const double x) const |
| get Y-coordinate correspond to 'x' More... | |
| double | dist (const Vector2D &p) const |
| calculate distance from point to this line More... | |
| double | dist2 (const Vector2D &p) const |
| get squared distance from this line to point More... | |
| bool | isParallel (const Line2D &line) const |
| check if the slope of this line is same to the slope of 'line' More... | |
| Vector2D | intersection (const Line2D &line) const |
| get the intersection point with 'line' More... | |
| Line2D | perpendicular (const Vector2D &p) const |
| calc perpendicular line (SUI-SEN) More... | |
| Vector2D | projection (const Vector2D &p) const |
| calc projection point from p More... | |
Static Public Member Functions | |
| static Vector2D | intersection (const Line2D &line1, const Line2D &line2) |
| get the intersection point of 2 lines More... | |
| static Line2D | angle_bisector (const Vector2D &origin, const AngleDeg &left, const AngleDeg &right) |
| make angle bisector line from two angles More... | |
| static Line2D | perpendicular_bisector (const Vector2D &p1, const Vector2D &p2) |
| make perpendicular bisector line from twt points More... | |
Static Public Attributes | |
| static const double | EPSILON |
| tolerance threshold | |
| static const double | ERROR_VALUE |
| error value | |
2d straight line class
Line Fomula: aX + bY + c = 0
|
inline |
construct directly
| a | Line formula A, coefficient for x |
| b | Line formula B, coefficient for y |
| c | constant C |
construct from 2 points
| p1 | first point |
| p2 | second point |
construct from origin point + direction
| origin | origin point |
| linedir | direction from origin point |
|
inline |
accessor
|
inlinestatic |
make angle bisector line from two angles
| origin | origin point that is passed through by result line |
| left | left angle |
| right | right angle |
construct from origin point + direction
| origin | origin point |
| linedir | direction from origin point |
construct from 2 points
| p1 | first point |
| p2 | second point |
|
inline |
accessor
|
inline |
accessor
|
inline |
calculate distance from point to this line
| p | considrered point |
|
inline |
get squared distance from this line to point
| p | considrered point |
|
inline |
get X-coordinate correspond to 'y'
| y | considered Y |
|
inline |
get Y-coordinate correspond to 'x'
| x | considered X |
get the intersection point with 'line'
| line | considered line |
get the intersection point of 2 lines
| line1 | the first line |
| line2 | the second line |
|
inline |
check if the slope of this line is same to the slope of 'line'
| line | considered line |
| true | almost same |
| false | not same |
calc perpendicular line (SUI-SEN)
| p | the point that perpendicular line pass through |
|
static |
make perpendicular bisector line from twt points
| p1 | 1st point |
| p2 | 2nd point |
calc projection point from p
| p | base point |