#include <Geometry.h>
Public Methods | |
Line (double a, double b, double c) | |
void | show (ostream &os=cout) |
VecPosition | getIntersection (Line line) |
int | getCircleIntersectionPoints (Circle circle, VecPosition *posSolution1, VecPosition *posSolution2) |
Line | getTangentLine (VecPosition pos) |
VecPosition | getPointOnLineClosestTo (VecPosition pos) |
double | getDistanceWithPoint (VecPosition pos) |
bool | isInBetween (VecPosition pos, VecPosition point1, VecPosition point2) |
double | getYGivenX (double x) |
double | getXGivenY (double y) |
double | getACoefficient () const |
double | getBCoefficient () const |
double | getCCoefficient () const |
Static Public Methods | |
Line | makeLineFromTwoPoints (VecPosition pos1, VecPosition pos2) |
Line | makeLineFromPositionAndAngle (VecPosition vec, AngDeg angle) |
Private Attributes | |
double | m_a |
double | m_b |
double | m_c |
Friends | |
ostream & | operator<< (ostream &os, Line l) |
Definition at line 254 of file Geometry.h.
|
This constructor creates a line by given the three coefficents of the line. A line is specified by the formula ay + bx + c = 0.
Definition at line 1233 of file Geometry.C. Referenced by getTangentLine(), and makeLineFromTwoPoints(). |
|
This method returns the a coefficient from the line ay + bx + c = 0.
Definition at line 1484 of file Geometry.C. References m_a. Referenced by getIntersection(), and operator<<(). |
|
This method returns the b coefficient from the line ay + bx + c = 0.
Definition at line 1491 of file Geometry.C. References m_b. Referenced by getIntersection(), and operator<<(). |
|
This method returns the c coefficient from the line ay + bx + c = 0.
Definition at line 1498 of file Geometry.C. References m_c. Referenced by getIntersection(), and operator<<(). |
|
This method calculates the intersection points between the current line and the circle specified with as center 'posCenter' and radius 'dRadius'. The number of solutions are returned and the corresponding points are put in the third and fourth argument of the method
Definition at line 1320 of file Geometry.C. References Geometry::abcFormula(), EPSILON, Circle::getCenter(), Circle::getRadius(), VecPosition::getX(), VecPosition::getY(), m_a, m_b, m_c, and VecPosition::setVecPosition(). Referenced by BasicPlayer::interceptClose(). |
|
This method returns the distance between a specified position and the closest point on the given line.
Definition at line 1391 of file Geometry.C. References VecPosition::getDistanceTo(), and getPointOnLineClosestTo(). |
|
This method returns the intersection point between the current Line and the specified line.
Definition at line 1278 of file Geometry.C. References getACoefficient(), getBCoefficient(), getCCoefficient(), getYGivenX(), m_a, m_b, and m_c. Referenced by BasicPlayer::clearBall(), BasicPlayer::defendGoalLine(), Player::deMeer5_goalie(), WorldModel::getOuterPositionInField(), getPointOnLineClosestTo(), BasicPlayer::getShootPositionOnLine(), WorldModel::isBallHeadingToGoal(), and BasicPlayer::moveToPosAlongLine(). |
|
This method returns the closest point on a line to a given position.
Definition at line 1381 of file Geometry.C. References getIntersection(), and getTangentLine(). Referenced by WorldModel::getClosestInSetTo(), getDistanceWithPoint(), WorldModel::getNrInSetInCone(), BasicPlayer::interceptCloseGoalie(), isInBetween(), BasicPlayer::moveToPosAlongLine(), and BasicPlayer::outplayOpponent(). |
|
This method returns the tangent line to a VecPosition. This is the line between the specified position and the closest point on the line to this position.
Definition at line 1370 of file Geometry.C. References VecPosition::getX(), VecPosition::getY(), Line(), m_a, and m_b. Referenced by getPointOnLineClosestTo(). |
|
This method calculates the x coordinate given the x coordinate
Definition at line 1432 of file Geometry.C. |
|
This method calculates the y coordinate given the x coordinate
Definition at line 1416 of file Geometry.C. References m_a, m_b, m_c, and show(). Referenced by getIntersection(). |
|
This method determines whether the projection of a point on the current line lies between two other points ('point1' and 'point2') that lie on the same line.
Definition at line 1403 of file Geometry.C. References VecPosition::getDistanceTo(), and getPointOnLineClosestTo(). Referenced by WorldModel::getClosestInSetTo(), and WorldModel::getNrInSetInCone(). |
|
This method creates a line given a position and an angle.
Definition at line 1475 of file Geometry.C. References AngDeg, and makeLineFromTwoPoints(). Referenced by BasicPlayer::clearBall(), BasicPlayer::defendGoalLine(), WorldModel::getOuterPositionInField(), BasicPlayer::getShootPositionOnLine(), BasicPlayer::interceptClose(), BasicPlayer::interceptCloseGoalie(), WorldModel::isBallHeadingToGoal(), BasicPlayer::moveToPosAlongLine(), and BasicPlayer::outplayOpponent(). |
|
This method creates a line given two points.
Definition at line 1447 of file Geometry.C. References EPSILON, VecPosition::getX(), VecPosition::getY(), and Line(). Referenced by BasicPlayer::clearBall(), BasicPlayer::defendGoalLine(), Player::deMeer5_goalie(), WorldModel::getNrInSetInCone(), BasicPlayer::getShootPositionOnLine(), WorldModel::isBallHeadingToGoal(), makeLineFromPositionAndAngle(), and BasicPlayer::moveToPosAlongLine(). |
|
This method prints the line information to the specified output stream.
Definition at line 1269 of file Geometry.C. Referenced by getYGivenX(). |
|
This function prints the line to the specified output stream in the format y = ax + b.
Definition at line 1245 of file Geometry.C. |
|
This is the a coefficient in the line ay + bx + c = 0 Definition at line 257 of file Geometry.h. Referenced by getACoefficient(), getCircleIntersectionPoints(), getIntersection(), getTangentLine(), getXGivenY(), getYGivenX(), and Line(). |
|
This is the b coefficient in the line ay + bx + c = 0 Definition at line 258 of file Geometry.h. Referenced by getBCoefficient(), getCircleIntersectionPoints(), getIntersection(), getTangentLine(), getXGivenY(), getYGivenX(), and Line(). |
|
This is the c coefficient in the line ay + bx + c = 0 Definition at line 259 of file Geometry.h. Referenced by getCCoefficient(), getCircleIntersectionPoints(), getIntersection(), getXGivenY(), getYGivenX(), and Line(). |