#include <Geometry.h>
Public Methods | |
VecPosition (double vx=0, double vy=0, CoordSystemT cs=CARTESIAN) | |
VecPosition | operator- () |
VecPosition | operator+ (const double &d) |
VecPosition | operator+ (const VecPosition &p) |
VecPosition | operator- (const double &d) |
VecPosition | operator- (const VecPosition &p) |
VecPosition | operator * (const double &d) |
VecPosition | operator * (const VecPosition &p) |
VecPosition | operator/ (const double &d) |
VecPosition | operator/ (const VecPosition &p) |
void | operator= (const double &d) |
void | operator+= (const VecPosition &p) |
void | operator+= (const double &d) |
void | operator-= (const VecPosition &p) |
void | operator-= (const double &d) |
void | operator *= (const VecPosition &p) |
void | operator *= (const double &d) |
void | operator/= (const VecPosition &p) |
void | operator/= (const double &d) |
bool | operator!= (const VecPosition &p) |
bool | operator!= (const double &d) |
bool | operator== (const VecPosition &p) |
bool | operator== (const double &d) |
void | show (CoordSystemT cs=CARTESIAN) |
string | str (CoordSystemT cs=CARTESIAN) |
bool | setX (double dX) |
double | getX () const |
bool | setY (double dY) |
double | getY () const |
void | setVecPosition (double dX=0, double dY=0, CoordSystemT cs=CARTESIAN) |
double | getDistanceTo (const VecPosition p) |
VecPosition | setMagnitude (double d) |
double | getMagnitude () const |
AngDeg | getDirection () const |
bool | isInFrontOf (const VecPosition &p) |
bool | isInFrontOf (const double &d) |
bool | isBehindOf (const VecPosition &p) |
bool | isBehindOf (const double &d) |
bool | isLeftOf (const VecPosition &p) |
bool | isLeftOf (const double &d) |
bool | isRightOf (const VecPosition &p) |
bool | isRightOf (const double &d) |
bool | isBetweenX (const VecPosition &p1, const VecPosition &p2) |
bool | isBetweenX (const double &d1, const double &d2) |
bool | isBetweenY (const VecPosition &p1, const VecPosition &p2) |
bool | isBetweenY (const double &d1, const double &d2) |
VecPosition | normalize () |
VecPosition | rotate (AngDeg angle) |
VecPosition | globalToRelative (VecPosition orig, AngDeg ang) |
VecPosition | relativeToGlobal (VecPosition orig, AngDeg ang) |
VecPosition | getVecPositionOnLineFraction (VecPosition &p, double dFrac) |
Static Public Methods | |
VecPosition | getVecPositionFromPolar (double dMag, AngDeg ang) |
AngDeg | normalizeAngle (AngDeg angle) |
Private Attributes | |
double | m_x |
double | m_y |
Friends | |
ostream & | operator<< (ostream &os, VecPosition p) |
Definition at line 108 of file Geometry.h.
|
Constructor for the VecPosition class. When the supplied Coordinate System type equals CARTESIAN, the arguments x and y denote the x- and y-coordinates of the new position. When it equals POLAR however, the arguments x and y denote the polar coordinates of the new position; in this case x is thus equal to the distance r from the origin and y is equal to the angle phi that the polar vector makes with the x-axis.
Definition at line 238 of file Geometry.cpp. References CoordSystemT, and setVecPosition(). Referenced by getVecPositionFromPolar(), operator *(), operator+(), operator-(), and operator/(). |
|
This method determines the direction of the vector corresponding with the current VecPosition (the phi-coordinate in polar representation) using the arc tangent function. Note that the signs of x and y have to be taken into account in order to determine the correct quadrant.
Definition at line 674 of file Geometry.cpp. References AngDeg, atan2Deg(), m_x, and m_y. Referenced by BasicPlayer::accelerateBallToVelocity(), WorldModel::checkParticlesBall(), BasicPlayer::getActiveInterceptionPointBall(), WorldModel::getBallDirection(), BasicPlayer::getInterceptionPointBall(), Object::getRelativeAngle(), BasicPlayer::kickBallCloseToBody(), BasicPlayer::kickTo(), WorldModel::logDrawBallInfo(), WorldModel::predictCommandTurnTowards(), WorldModel::predictFinalAgentPos(), WorldModel::predictPosAfterNrCycles(), rotate(), BallObject::show(), FixedObject::show(), show(), and str(). |
|
|
This method determines the magnitude (length) of the vector corresponding with the current VecPosition using the formula of Pythagoras.
Definition at line 661 of file Geometry.cpp. Referenced by BasicPlayer::accelerateBallToVelocity(), WorldModel::calculateStateAgent(), WorldModel::calculateStateBall(), WorldModel::calculateStatePlayer(), WorldModel::checkParticlesBall(), BasicPlayer::directTowards(), BasicPlayer::getActiveInterceptionPointBall(), WorldModel::getBallSpeed(), WorldModel::getClosestInSetTo(), WorldModel::getFastestInSetTo(), WorldModel::getFurthestInSetTo(), BasicPlayer::getInterceptionPointBall(), WorldModel::getProbTackleSucceeds(), Object::getRelativeDistance(), WorldModel::getSecondClosestInSetTo(), DynamicObject::getSpeed(), BasicPlayer::interceptClose(), WorldModel::isCollisionAfterCommand(), BasicPlayer::kickBallCloseToBody(), BasicPlayer::kickTo(), WorldModel::logDrawBallInfo(), WorldModel::predictBallInfoAfterCommand(), WorldModel::predictCommandToInterceptBall(), WorldModel::predictCommandTurnTowards(), WorldModel::predictFinalAgentPos(), WorldModel::predictNrCyclesToPoint(), WorldModel::predictPosAfterNrCycles(), WorldModel::predictStateAfterDash(), WorldModel::predictStateAfterTurn(), rotate(), DynamicObject::setGlobalVelocity(), setMagnitude(), BallObject::show(), FixedObject::show(), show(), str(), WorldModel::updateAgentAndBallAfterSense(), and WorldModel::updateParticlesBall(). |
|
This method converts a polar representation of a VecPosition into a Cartesian representation.
Definition at line 991 of file Geometry.cpp. References AngDeg, cosDeg(), sinDeg(), and VecPosition(). Referenced by WorldModel::calculateStateAgent3(), WorldModel::predictStateAfterDash(), and setVecPosition(). |
|
This method returns a VecPosition that lies somewhere on the vector between the current VecPosition and a given VecPosition. The desired position is specified by a given fraction of this vector (e.g. 0.5 means exactly in the middle of the vector). The current VecPosition itself is left unchanged.
Definition at line 969 of file Geometry.cpp. Referenced by Circle::getIntersectionArea(). |
|
Get method for the x-coordinate of the current VecPosition.
Definition at line 573 of file Geometry.cpp. Referenced by Player::amIAgentToSaySomething(), WorldModel::averageParticles(), WorldModel::calculateAngleAgentWithPos(), WorldModel::calculatePosAgentWith2Flags(), WorldModel::calculateStateAgent2(), WorldModel::calculateStateBall(), WorldModel::checkParticlesBall(), BasicPlayer::clearBall(), WorldModel::coordinateWith(), BasicPlayer::defendGoalLine(), Player::deMeer5(), Player::deMeer5_goalie(), WorldModel::drawCoordinationGraph(), BasicPlayer::dribble(), Line::getCircleIntersectionPoints(), WorldModel::getClosestPlayerInFormationTo(), WorldModel::getDirectionOfWidestAngle(), BasicPlayer::getDribblePoint(), SoccerTypes::getGlobalPositionFlag(), BasicPlayer::getInterceptionPointBall(), Circle::getIntersectionPoints(), WorldModel::getLastOpponentDefender(), WorldModel::getMarkingPosition(), BasicPlayer::getMarkingPosition(), WorldModel::getOffsideX(), WorldModel::getOppGoalieType(), WorldModel::getOwnGoalieType(), WorldModel::getPowerForDash(), WorldModel::getProbTackleSucceeds(), WorldModel::getStrategicPosition(), Formations::getStrategicPosition(), Line::getTangentLine(), BasicPlayer::interceptClose(), BasicPlayer::interceptScoringAttempt(), WorldModel::isBallHeadingToGoal(), isBehindOf(), isInFrontOf(), WorldModel::isInOwnPenaltyArea(), Rect::isInside(), WorldModel::isInTheirPenaltyArea(), WorldModel::isOnside(), BasicPlayer::kickBallCloseToBody(), BasicPlayer::kickTo(), WorldModel::logCircle(), WorldModel::logCoordInfo(), WorldModel::logDrawBallInfo(), WorldModel::logDrawInfo(), WorldModel::logLine(), WorldModel::logObjectInformation(), Player::mainLoop(), Player::makeBallInfo(), Line::makeLineFromTwoPoints(), WorldModel::mapUnknownPlayers(), BasicPlayer::moveToPos(), BasicPlayer::outplayOpponent(), Player::performPenalty(), WorldModel::predictCommandToInterceptBall(), WorldModel::predictNrCyclesToPoint(), WorldModel::processPlayerMessage(), Player::sayBallStatus(), Player::sayOppAttackerStatus(), Rect::setRectanglePoints(), str(), BasicPlayer::teleportToPos(), WorldModel::updateAfterSenseMessage(), WorldModel::updateAgentAndBallAfterSense(), WorldModel::updateBallForCollision(), WorldModel::updateDynamicObjectForNextCycle(), and WorldModel::updateParticlesAgent(). |
|
Get method for the y-coordinate of the current VecPosition.
Definition at line 591 of file Geometry.cpp. Referenced by BasicPlayer::accelerateBallToVelocity(), WorldModel::averageParticles(), WorldModel::calculateAngleAgentWithPos(), WorldModel::calculatePosAgentWith2Flags(), WorldModel::calculateStateAgent2(), WorldModel::calculateStateBall(), WorldModel::checkParticlesBall(), BasicPlayer::clearBall(), WorldModel::coordinateWith(), BasicPlayer::defendGoalLine(), Player::deMeer5_goalie(), WorldModel::drawCoordinationGraph(), BasicPlayer::dribble(), Line::getCircleIntersectionPoints(), Player::getDeadBallPosition(), WorldModel::getDirectionOfWidestAngle(), BasicPlayer::getDribblePoint(), SoccerTypes::getGlobalPositionFlag(), BasicPlayer::getInterceptionPointBall(), Circle::getIntersectionPoints(), WorldModel::getMarkingPosition(), WorldModel::getOppGoalieType(), WorldModel::getOuterPositionInField(), WorldModel::getOwnGoalieType(), WorldModel::getProbTackleSucceeds(), Formations::getStrategicPosition(), Line::getTangentLine(), BasicPlayer::interceptScoringAttempt(), WorldModel::isBallHeadingToGoal(), WorldModel::isInOwnPenaltyArea(), Rect::isInside(), WorldModel::isInTheirPenaltyArea(), isLeftOf(), isRightOf(), BasicPlayer::kickBallCloseToBody(), BasicPlayer::kickTo(), WorldModel::logCircle(), WorldModel::logCoordInfo(), WorldModel::logDrawBallInfo(), WorldModel::logDrawInfo(), WorldModel::logLine(), WorldModel::logObjectInformation(), Player::makeBallInfo(), Line::makeLineFromTwoPoints(), WorldModel::mapUnknownPlayers(), BasicPlayer::moveToPos(), BasicPlayer::outplayOpponent(), WorldModel::predictCommandToInterceptBall(), WorldModel::processPlayerMessage(), Player::sayBallStatus(), Player::sayOppAttackerStatus(), Rect::setRectanglePoints(), str(), BasicPlayer::teleportToPos(), WorldModel::updateAfterSenseMessage(), WorldModel::updateAgentAndBallAfterSense(), WorldModel::updateBallForCollision(), WorldModel::updateDynamicObjectForNextCycle(), and WorldModel::updateParticlesAgent(). |
|
This method converts the coordinates of the current VecPosition (which are represented in an global coordinate system with the origin at (0,0)) into relative coordinates in a different coordinate system (e.g. relative to a player). The new coordinate system is defined by the arguments to the method. The relative coordinates are now obtained by aligning the relative coordinate system with the global coordinate system using a translation to make both origins coincide followed by a rotation to align the axes.
Definition at line 917 of file Geometry.cpp. References AngDeg, and rotate(). Referenced by WorldModel::checkParticlesBall(), and WorldModel::updateObjectRelativeFromGlobal(). |
|
This method determines whether the x-coordinate of the current VecPosition is behind (i.e. smaller than) a given double value.
Definition at line 729 of file Geometry.cpp. References m_x. |
|
This method determines whether the current VecPosition is behind a given VecPosition, i.e. whether the x-coordinate of the current VecPosition is smaller than the x-coordinate of the given VecPosition.
Definition at line 716 of file Geometry.cpp. Referenced by isBetweenX(). |
|
This method determines whether the x-coordinate of the current VecPosition is in between two given double values, i.e. whether the x-coordinate of the current VecPosition is in front of the first argument and behind the second.
Definition at line 824 of file Geometry.cpp. References isBehindOf(), and isInFrontOf(). |
|
This method determines whether the current VecPosition is in between two given VecPositions when looking in the x-direction, i.e. whether the current VecPosition is in front of the first argument and behind the second.
Definition at line 806 of file Geometry.cpp. References isBehindOf(), and isInFrontOf(). Referenced by Rect::isInside(). |
|
This method determines whether the y-coordinate of the current VecPosition is in between two given double values, i.e. whether the y-coordinate of the current VecPosition is to the right of the first argument and to the left of the second.
Definition at line 861 of file Geometry.cpp. |
|
This method determines whether the current VecPosition is in between two given VecPositions when looking in the y-direction, i.e. whether the current VecPosition is to the right of the first argument and to the left of the second.
Definition at line 843 of file Geometry.cpp. References isLeftOf(), and isRightOf(). Referenced by Rect::isInside(). |
|
This method determines whether the x-coordinate of the current VecPosition is in front of (i.e. larger than) a given double value.
Definition at line 701 of file Geometry.cpp. References m_x. |
|
This method determines whether the current VecPosition is in front of a given VecPosition, i.e. whether the x-coordinate of the current VecPosition is larger than the x-coordinate of the given VecPosition.
Definition at line 687 of file Geometry.cpp. Referenced by isBetweenX(). |
|
This method determines whether the y-coordinate of the current VecPosition is to the left of (i.e. smaller than) a given double value.
Definition at line 758 of file Geometry.cpp. References m_y. |
|
This method determines whether the current VecPosition is to the left of a given VecPosition, i.e. whether the y-coordinate of the current VecPosition is smaller than the y-coordinate of the given VecPosition.
Definition at line 744 of file Geometry.cpp. Referenced by Player::deMeer5_goalie(), and isBetweenY(). |
|
This method determines whether the y-coordinate of the current VecPosition is to the right of (i.e. larger than) a given double value.
Definition at line 787 of file Geometry.cpp. References m_y. |
|
This method determines whether the current VecPosition is to the right of a given VecPosition, i.e. whether the y-coordinate of the current VecPosition is larger than the y-coordinate of the given VecPosition.
Definition at line 773 of file Geometry.cpp. Referenced by Player::deMeer5_goalie(), and isBetweenY(). |
|
This method normalizes a VecPosition by setting the magnitude of the corresponding vector to 1. This thus changes the VecPosition itself.
Definition at line 872 of file Geometry.cpp. References setMagnitude(). |
|
This method normalizes an angle. This means that the resulting angle lies between -180 and 180 degrees.
Definition at line 1003 of file Geometry.cpp. References AngDeg. Referenced by BasicPlayer::accelerateBallToVelocity(), SenseHandler::analyzeFullStateMessage(), WorldModel::calculateAngleAgentWithPos(), WorldModel::calculateStateAgent(), WorldModel::calculateStateAgent3(), WorldModel::checkParticlesAgent(), WorldModel::checkParticlesBall(), BasicPlayer::directTowards(), BasicPlayer::dribble(), BasicPlayer::freezeBall(), BasicPlayer::getActiveInterceptionPointBall(), getBisectorTwoAngles(), Player::getDeadBallPosition(), WorldModel::getDirectionOfWidestAngle(), SoccerTypes::getGlobalAngleLine(), BasicPlayer::getInterceptionPointBall(), WorldModel::getProbTackleSucceeds(), WorldModel::getRelativeAngle(), Object::getRelativeAngle(), BasicPlayer::holdBall(), WorldModel::initParticlesAgent(), BasicPlayer::interceptClose(), BasicPlayer::interceptCloseGoalie(), BasicPlayer::kickBallCloseToBody(), WorldModel::logDrawBallInfo(), WorldModel::mapUnknownPlayers(), BasicPlayer::mark(), BasicPlayer::moveToPos(), BasicPlayer::moveToPosAlongLine(), BasicPlayer::outplayOpponent(), Player::performPenalty(), WorldModel::predictBallInfoAfterCommand(), WorldModel::predictCommandTurnTowards(), WorldModel::predictNrCyclesToPoint(), WorldModel::predictStateAfterCommand(), WorldModel::predictStateAfterDash(), WorldModel::predictStateAfterTurn(), WorldModel::processLastSenseMessage(), WorldModel::processSeeGlobalInfo(), WorldModel::removeGhosts(), BasicPlayer::searchBall(), AgentObject::setGlobalNeckAngle(), BasicPlayer::turnBackToPoint(), BasicPlayer::turnBodyToPoint(), BasicPlayer::turnNeckToPoint(), BasicPlayer::turnWithBallTo(), WorldModel::updateDynamicObjectAfterSee(), and WorldModel::updateParticlesBall(). |
|
Overloaded version of the multiplication operator for VecPositions. It returns the product of the current VecPosition and the given VecPosition by multiplying their x- and y-coordinates. The VecPositions themselves are left unchanged.
Definition at line 320 of file Geometry.cpp. References m_x, m_y, and VecPosition(). |
|
Overloaded version of the multiplication operator for multiplying a VecPosition by a given double value. Both the x- and y-coordinates of the current VecPosition are multiplied by this value. The current VecPosition itself is left unchanged.
Definition at line 308 of file Geometry.cpp. References m_x, m_y, and VecPosition(). |
|
Overloaded version of the multiplication-assignment operator for multiplying a VecPosition by a given double value. Both the x- and y-coordinates of the current VecPosition are multiplied by this value. This changes the current VecPosition itself.
Definition at line 430 of file Geometry.cpp. |
|
Overloaded version of the multiplication-assignment operator for VecPositions. It returns the product of the current VecPosition and the given VecPosition by multiplying their x- and y-coordinates. This changes the current VecPosition itself.
Definition at line 417 of file Geometry.cpp. |
|
Overloaded version of the inequality operator for comparing a VecPosition to a double value. It determines whether either the x- or y-coordinate of the current VecPosition is unequal to the given double value.
Definition at line 482 of file Geometry.cpp. |
|
Overloaded version of the inequality operator for VecPositions. It determines whether the current VecPosition is unequal to the given VecPosition by comparing their x- and y-coordinates.
Definition at line 468 of file Geometry.cpp. |
|
Overloaded version of the binary plus operator for VecPositions. It returns the sum of the current VecPosition and the given VecPosition by adding their x- and y-coordinates. The VecPositions themselves are left unchanged.
Definition at line 270 of file Geometry.cpp. References m_x, m_y, and VecPosition(). |
|
Overloaded version of the binary plus operator for adding a given double value to a VecPosition. The double value is added to both the x- and y-coordinates of the current VecPosition. The current VecPosition itself is left unchanged.
Definition at line 260 of file Geometry.cpp. References m_x, m_y, and VecPosition(). |
|
Overloaded version of the sum-assignment operator for adding a given double value to a VecPosition. The double value is added to both the x- and y-coordinates of the current VecPosition. This changes the current VecPosition itself.
Definition at line 378 of file Geometry.cpp. |
|
Overloaded version of the sum-assignment operator for VecPositions. It returns the sum of the current VecPosition and the given VecPosition by adding their x- and y-coordinates. This changes the current VecPosition itself.
Definition at line 366 of file Geometry.cpp. |
|
Overloaded version of the binary minus operator for VecPositions. It returns the difference between the current VecPosition and the given VecPosition by subtracting their x- and y-coordinates. The VecPositions themselves are left unchanged.
Definition at line 296 of file Geometry.cpp. References m_x, m_y, and VecPosition(). |
|
Overloaded version of the binary minus operator for subtracting a given double value from a VecPosition. The double value is subtracted from both the x- and y-coordinates of the current VecPosition. The current VecPosition itself is left unchanged.
Definition at line 283 of file Geometry.cpp. References m_x, m_y, and VecPosition(). |
|
Overloaded version of unary minus operator for VecPositions. It returns the negative VecPosition, i.e. both the x- and y-coordinates are multiplied by -1. The current VecPosition itself is left unchanged.
Definition at line 247 of file Geometry.cpp. References m_x, m_y, and VecPosition(). |
|
Overloaded version of the difference-assignment operator for subtracting a given double value from a VecPosition. The double value is subtracted from both the x- and y-coordinates of the current VecPosition. This changes the current VecPosition itself.
Definition at line 404 of file Geometry.cpp. |
|
Overloaded version of the difference-assignment operator for VecPositions. It returns the difference between the current VecPosition and the given VecPosition by subtracting their x- and y-coordinates. This changes the current VecPosition itself.
Definition at line 391 of file Geometry.cpp. |
|
Overloaded version of the division operator for VecPositions. It returns the quotient of the current VecPosition and the given VecPosition by dividing their x- and y-coordinates. The VecPositions themselves are left unchanged.
Definition at line 345 of file Geometry.cpp. References m_x, m_y, and VecPosition(). |
|
Overloaded version of the division operator for dividing a VecPosition by a given double value. Both the x- and y-coordinates of the current VecPosition are divided by this value. The current VecPosition itself is left unchanged.
Definition at line 333 of file Geometry.cpp. References m_x, m_y, and VecPosition(). |
|
Overloaded version of the division-assignment operator for dividing a VecPosition by a given double value. Both the x- and y-coordinates of the current VecPosition are divided by this value. This changes the current VecPosition itself.
Definition at line 455 of file Geometry.cpp. |
|
Overloaded version of the division-assignment operator for VecPositions. It returns the quotient of the current VecPosition and the given VecPosition by dividing their x- and y-coordinates. This changes the current VecPosition itself.
Definition at line 442 of file Geometry.cpp. |
|
Overloaded version of the assignment operator for assigning a given double value to both the x- and y-coordinates of the current VecPosition. This changes the current VecPosition itself.
Definition at line 355 of file Geometry.cpp. |
|
Overloaded version of the equality operator for comparing a VecPosition to a double value. It determines whether both the x- and y-coordinates of the current VecPosition are equal to the given double value.
Definition at line 509 of file Geometry.cpp. |
|
Overloaded version of the equality operator for VecPositions. It determines whether the current VecPosition is equal to the given VecPosition by comparing their x- and y-coordinates.
Definition at line 495 of file Geometry.cpp. |
|
This method converts the coordinates of the current VecPosition (which are represented in a relative coordinate system) into global coordinates in the world frame (with origin at (0,0)). The relative coordinate system is defined by the arguments to the method. The global coordinates are now obtained by aligning the world frame with the relative frame using a rotation to align the axes followed by a translation to make both origins coincide.
Definition at line 943 of file Geometry.cpp. References AngDeg, and rotate(). Referenced by WorldModel::calculateVelocityDynamicObject(), and WorldModel::initParticlesBall(). |
|
This method rotates the vector corresponding to the current VecPosition over a given angle thereby changing the current VecPosition itself. This is done by calculating the polar coordinates of the current VecPosition and adding the given angle to the phi-coordinate in the polar representation. The polar coordinates are then converted back to Cartesian coordinates to obtain the desired result.
Definition at line 891 of file Geometry.cpp. References AngDeg, getDirection(), getMagnitude(), POLAR, and setVecPosition(). Referenced by BasicPlayer::accelerateBallToVelocity(), WorldModel::calculateStateAgent(), WorldModel::calculateStateAgent2(), WorldModel::calculateStateAgent3(), WorldModel::getPowerForDash(), WorldModel::getProbTackleSucceeds(), globalToRelative(), BasicPlayer::kickTo(), WorldModel::predictNrCyclesToPoint(), relativeToGlobal(), and WorldModel::updateAgentAndBallAfterSense(). |
|
This method adjusts the coordinates of the current VecPosition in such a way that the magnitude of the corresponding vector equals the double value which is supplied as an argument. It thus scales the vector to a given length by multiplying both the x- and y-coordinates by the quotient of the argument and the current magnitude. This changes the VecPosition itself.
Definition at line 647 of file Geometry.cpp. References EPSILON, and getMagnitude(). Referenced by WorldModel::calculateStateAgent(), WorldModel::calculateStateBall(), WorldModel::calculateStatePlayer(), normalize(), WorldModel::predictBallInfoAfterCommand(), WorldModel::predictStateAfterCommand(), WorldModel::predictStateAfterDash(), WorldModel::updateAgentAndBallAfterSense(), and WorldModel::updateParticlesBall(). |
|
This method (re)sets the coordinates of the current VecPosition. The given coordinates can either be polar or Cartesian coordinates. This is indicated by the value of the third argument.
Definition at line 611 of file Geometry.cpp. References CARTESIAN, CoordSystemT, getVecPositionFromPolar(), m_x, and m_y. Referenced by AgentObject::AgentObject(), WorldModel::calculateStateAgent2(), WorldModel::calculateStateBall(), BasicPlayer::clearBall(), Line::getCircleIntersectionPoints(), SoccerTypes::getGlobalPositionFlag(), Circle::getIntersectionPoints(), WorldModel::getMarkingPosition(), WorldModel::getStrategicPosition(), WorldModel::initParticlesBall(), BasicPlayer::interceptScoringAttempt(), BasicPlayer::kickTo(), Player::performPenalty(), WorldModel::predictCommandToInterceptBall(), WorldModel::predictNrCyclesToPoint(), WorldModel::predictStateAfterCommand(), rotate(), Player::sayBallStatus(), DynamicObject::setGlobalVelocity(), Object::setRelativePosition(), WorldModel::updateAgentAndBallAfterSense(), WorldModel::updateDynamicObjectForNextCycle(), and VecPosition(). |
|
Set method for the x-coordinate of the current VecPosition.
Definition at line 564 of file Geometry.cpp. References m_x. Referenced by Player::deMeer5_goalie(), BasicPlayer::dribble(), WorldModel::getMarkingPosition(), WorldModel::getStrategicPosition(), Rect::setRectanglePoints(), FormationTypeInfo::setXPosHome(), and WorldModel::updateParticlesAgent(). |
|
Set method for the y-coordinate of the current VecPosition.
Definition at line 582 of file Geometry.cpp. References m_y. Referenced by WorldModel::calculateStateBall(), BasicPlayer::clearBall(), BasicPlayer::defendGoalLine(), BasicPlayer::dribble(), WorldModel::getMarkingPosition(), Rect::setRectanglePoints(), FormationTypeInfo::setYPosHome(), and WorldModel::updateParticlesAgent(). |
|
This method writes the current VecPosition to standard output. It can also print a polar representation of the current VecPosition.
Definition at line 532 of file Geometry.cpp. References CARTESIAN, CoordSystemT, getDirection(), and getMagnitude(). |
|
This method writes the current VecPosition to a string. It can also write a polar representation of the current VecPosition.
Definition at line 547 of file Geometry.cpp. References CARTESIAN, CoordSystemT, getDirection(), getMagnitude(), getX(), and getY(). |
|
Overloaded version of the C++ output operator for VecPositions. This operator makes it possible to use VecPositions in output statements (e.g. cout << v). The x- and y-coordinates of the VecPosition are printed in the format (x,y).
Definition at line 522 of file Geometry.cpp. |
|
x-coordinate of this position Definition at line 113 of file Geometry.h. Referenced by getDirection(), getMagnitude(), isBehindOf(), isInFrontOf(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), setVecPosition(), and setX(). |
|
y-coordinate of this position Definition at line 114 of file Geometry.h. Referenced by getDirection(), getMagnitude(), isLeftOf(), isRightOf(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), setVecPosition(), and setY(). |