#include <Field.h>
Inheritance diagram for Field:
Public Member Functions | |
Field () | |
Constructor. | |
bool | isReallyInside (const Vector2< double > &v) const |
The function checks whether a point is inside the field. | |
double | clip (Vector2< double > &v) const |
The function clips a point to the field. | |
Vector2< double > | getClosestPoint (const Vector2< double > &v, LinesPercept::LineType type) const |
The function returns the point on a line of a certain type closest to given a point. | |
Vector2< double > | getClosestPoint (const Pose2D &p, int numberOfRotations, LinesPercept::LineType type) const |
The function returns the point on a line of a certain type closest to given a point. | |
double | getClosestDistance (const Vector2< double > &v, LinesPercept::LineType type) const |
The function returns the distance between a point and the closest point on a line of a certain type. | |
double | getDistance (const Pose2D &pose, LinesPercept::LineType type) const |
The function returns the distance between a point and the closest point on a line of a certain type in a certain direction. | |
double | getDistance (const Pose2D &pose, bool ignoreFieldLines=false) const |
The function returns the distance between a point and the closest point on a line in a certain direction. | |
double | getDistanceToOwnPenaltyArea (const Pose2D &pose) const |
The function returns the distance to the robots own penalty area for a given pose. | |
double | getObstacleDistance (const Pose2D &pose, ObstaclesPercept::ObstacleType &obstacleType) const |
The function returns the distance between a point and the closest obstacle point in a certain direction. | |
void | placePlayers (const PlayerPoseCollection &ppc) |
The function places all robots as obstacles in an internal data structure. | |
Pose2D | randomPose () const |
The function returns a random pose inside the field. | |
void | draw (const Drawings::Color color, LinesPercept::LineType type) const |
The function draws all lines of a cetain type. | |
Private Member Functions | |
void | initBoundary (Table &table) |
void | initLines (Table &table, Table &xTable, Table &yTable) |
void | initBorder (Table &table) |
void | initOpponentGoal (Table &table) |
void | initOwnGoal (Table &table) |
void | initSimpleLines (Table &table) |
void | addCoords (Table &table, int number, double *x, double *y) |
void | addCoords (Table &table, Table &xTable, Table &yTable, int number, double *x, double *y) |
void | addPlayer (const Pose2D &pose) |
Private Attributes | |
Table | boundary |
Table | lines [LinesPercept::numberOfLineTypes+4] |
Definition at line 22 of file Field.h.
|
Constructor.
Definition at line 16 of file Field.cpp. References Boundary< double >::add(), boundary, initBorder(), initBoundary(), initLines(), initOpponentGoal(), initOwnGoal(), initSimpleLines(), and lines. |
Here is the call graph for this function:
|
Definition at line 29 of file Field.cpp. References addCoords(), Field::Table::numberOfEntries, and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:
|
Definition at line 76 of file Field.cpp. References addCoords(), Field::Table::index, Field::Table::numberOfEntries, and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:
|
Definition at line 257 of file Field.cpp. References addCoords(), and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:
|
Definition at line 307 of file Field.cpp. References addCoords(), Field::Table::numberOfEntries, and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:
|
Definition at line 328 of file Field.cpp. References addCoords(), Field::Table::numberOfEntries, and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:
|
Definition at line 199 of file Field.cpp. References addCoords(), and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:
|
Definition at line 349 of file Field.cpp. References Vector2< V >::abs(), Field::Table::push(), Vector2< V >::x, and Vector2< V >::y. Referenced by addPlayer(), initBorder(), initBoundary(), initLines(), initOpponentGoal(), initOwnGoal(), and initSimpleLines(). |
Here is the call graph for this function:
|
Definition at line 361 of file Field.cpp. References Vector2< V >::abs(), Field::Table::push(), Vector2< V >::x, and Vector2< V >::y. |
Here is the call graph for this function:
|
Definition at line 601 of file Field.cpp. References addCoords(), RobotDimensions::bodyLength, getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), RobotDimensions::lengthNeckToBodyCenter, lines, RobotDimensions::overallBodyWidth, Vector2< V >::x, and Vector2< V >::y. Referenced by placePlayers(). |
Here is the call graph for this function:
|
The function checks whether a point is inside the field.
Definition at line 377 of file Field.cpp. References boundary, Field::Table::corner, Boundary< double >::isInside(), Field::Table::length, Field::Table::numberOfEntries, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y. Referenced by clip(), and randomPose(). |
Here is the call graph for this function:
|
The function clips a point to the field.
Definition at line 390 of file Field.cpp. References Vector2< V >::abs(), boundary, Field::Table::corner, isReallyInside(), Field::Table::length, Field::Table::numberOfEntries, Pose2D::translation, and Vector2< V >::x. Referenced by GT2004SelfLocator::calcPose(). |
Here is the call graph for this function:
|
The function returns the point on a line of a certain type closest to given a point.
Definition at line 419 of file Field.cpp. References Vector2< V >::abs(), Field::Table::corner, Field::Table::length, lines, Field::Table::numberOfEntries, Pose2D::translation, and Vector2< V >::x. Referenced by ObservationTable< 280, 200, 25 >::create(), and getClosestDistance(). |
Here is the call graph for this function:
|
The function returns the point on a line of a certain type closest to given a point.
Definition at line 446 of file Field.cpp. References Vector2< V >::abs(), ASSERT, Field::Table::corner, Field::Table::length, lines, normalize(), Field::Table::numberOfEntries, pi2, pi_2, Pose2D::rotation, Pose2D::translation, and Vector2< V >::x. |
Here is the call graph for this function:
|
The function returns the distance between a point and the closest point on a line of a certain type.
Definition at line 494 of file Field.cpp. References getClosestPoint(). |
Here is the call graph for this function:
|
The function returns the distance between a point and the closest point on a line of a certain type in a certain direction.
Definition at line 500 of file Field.cpp. References Field::Table::corner, Field::Table::length, lines, Field::Table::numberOfEntries, Vector2< V >::x, and Vector2< V >::y. Referenced by TemplateTable< 50000 >::create(), getDistance(), and getObstacleDistance(). |
|
The function returns the distance between a point and the closest point on a line in a certain direction.
Definition at line 521 of file Field.cpp. References getDistance(). |
Here is the call graph for this function:
|
The function returns the distance to the robots own penalty area for a given pose.
Definition at line 537 of file Field.cpp. References Field::Table::corner, Field::Table::length, lines, Vector2< V >::x, and Vector2< V >::y. Referenced by GT2004ObstaclesLocator::setObstaclesModel(). |
|
The function returns the distance between a point and the closest obstacle point in a certain direction.
Definition at line 558 of file Field.cpp. References getDistance(), and LinesPercept::LineType. |
Here is the call graph for this function:
|
The function places all robots as obstacles in an internal data structure.
Definition at line 591 of file Field.cpp. References addPlayer(), PlayerPoseCollection::getOpponentPlayerPose(), PlayerPoseCollection::getOwnPlayerPose(), PlayerPose::getPose(), lines, PlayerPoseCollection::numberOfOpponentPlayers, PlayerPoseCollection::numberOfOwnPlayers, and Field::Table::setSize(). |
Here is the call graph for this function:
|
The function returns a random pose inside the field.
Definition at line 617 of file Field.cpp. References isReallyInside(), pi, Pose2D::random(), and Pose2D::translation. Referenced by TemplateTable< 50000 >::create(), GT2004SelfLocator::getTemplate(), and GT2004SelfLocator::GT2004SelfLocator(). |
Here is the call graph for this function:
|
The function draws all lines of a cetain type. It is use to control the correctness of the model.
Definition at line 626 of file Field.cpp. References boundary, Field::Table::corner, Field::Table::length, LINE, lines, Field::Table::numberOfEntries, Pose2D::translation, Vector2< V >::x, Vector2< V >::y, and Vector2< double >::y. |
|
Definition at line 73 of file Field.h. Referenced by clip(), draw(), Field(), and isReallyInside(). |
|
Definition at line 73 of file Field.h. Referenced by addPlayer(), draw(), Field(), getClosestPoint(), getDistance(), getDistanceToOwnPenaltyArea(), and placePlayers(). |