#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. | |
| bool | getClosestPoint (Vector2< double > &point, 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 | initBoundaryForHugeField (Table &table) |
| void | initLines (Table &table, Table &xTable, Table &yTable) |
| void | initBorder (Table &table) |
| void | initBorderForHugeField (Table &table) |
| void | initOpponentGoal (Table &table) |
| void | initOwnGoal (Table &table) |
| void | initSimpleLines (Table &table) |
| void | initSimpleLinesForHugeField (Table &table) |
| void | addCoords (Table &table, int number, double *x, double *y, bool rotate=false) |
| void | addCoords (Table &table, Table &xTable, Table &yTable, int number, double *x, double *y, bool rotate=false) |
| void | addPlayer (const Pose2D &pose) |
Private Attributes | |
| Table | lines [LinesPercept::numberOfLineTypes+5] |
Definition at line 23 of file Field.h.
|
|
Constructor.
Definition at line 15 of file Field.cpp. References Boundary< double >::add(), initBorder(), initBorderForHugeField(), initBoundary(), initBoundaryForHugeField(), initLines(), initOpponentGoal(), initOwnGoal(), initSimpleLines(), initSimpleLinesForHugeField(), and lines. |
Here is the call graph for this function:

|
|
Definition at line 39 of file Field.cpp. References addCoords(), Field::Table::maxNumberOfEntries, and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:

|
|
Definition at line 86 of file Field.cpp. References addCoords(), and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 109 of file Field.cpp. References addCoords(), pi_2, and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:

|
|
Definition at line 516 of file Field.cpp. References addCoords(), and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:

|
|
Definition at line 566 of file Field.cpp. References addCoords(), pi, pi2, and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:

|
|
Definition at line 627 of file Field.cpp. References addCoords(), Field::Table::maxNumberOfEntries, and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:

|
|
Definition at line 648 of file Field.cpp. References addCoords(), Field::Table::maxNumberOfEntries, and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:

|
|
Definition at line 400 of file Field.cpp. References addCoords(), and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:

|
|
Definition at line 458 of file Field.cpp. References addCoords(), and Field::Table::setSize(). Referenced by Field(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
Definition at line 669 of file Field.cpp. References Field::Table::push(). Referenced by addPlayer(), initBorder(), initBorderForHugeField(), initBoundary(), initBoundaryForHugeField(), initLines(), initOpponentGoal(), initOwnGoal(), initSimpleLines(), and initSimpleLinesForHugeField(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||
|
Definition at line 683 of file Field.cpp. References Field::Table::push(). |
Here is the call graph for this function:

|
|
Definition at line 924 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 701 of file Field.cpp. References Boundary< double >::isInside(), lines, 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 716 of file Field.cpp. References Vector2< V >::abs(), isReallyInside(), lines, Field::Table::numberOfEntries, and Vector2< V >::x. Referenced by GT2004SelfLocator::calcPose(), SlamSelfLocator::calcPoseFromSubCube(), GT2005StableSelfLocator::calcPoseFromSubCube(), and GT2005SelfLocator::calcPoseFromSubCube(). |
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 745 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 LinesTables2005::ObservationTable< xSize, ySize, cellSize, pointRes >::create(), ObservationTable< 320, 240, 25, 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 772 of file Field.cpp. References Vector2< V >::abs(), ASSERT, Field::Table::corner, Field::Table::length, lines, 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 815 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 821 of file Field.cpp. References Field::Table::corner, Field::Table::length, lines, Field::Table::numberOfEntries, Vector2< V >::x, and Vector2< V >::y. Referenced by LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::create(), TemplateTable< 65000, 25 >::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 842 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 855 of file Field.cpp. References Field::Table::corner, Field::Table::length, lines, Vector2< V >::x, and Vector2< V >::y. Referenced by GT2005ObstaclesLocator::setObstaclesModel(). |
|
||||||||||||
|
The function returns the distance between a point and the closest obstacle point in a certain direction.
Definition at line 881 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 914 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 940 of file Field.cpp. References isReallyInside(), pi, Pose2D::random(), and Pose2D::translation. Referenced by LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::create(), TemplateTable< 65000, 25 >::create(), SlamSelfLocator::execute(), SlamSampleTemplateGenerator::getTemplate(), GT2005StableSampleTemplateGenerator::getTemplate(), GT2005SampleTemplateGenerator::getTemplate(), GT2004SelfLocator::getTemplate(), GT2004SelfLocator::GT2004SelfLocator(), GT2005StableSelfLocator::GT2005StableSelfLocator(), GT2005SelfLocator::resample(), GT2005SelfLocator::resetSamples(), GT2005SelfLocator::resetSamplesWhenPenalized(), and SlamSelfLocator::SlamSelfLocator(). |
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 949 of file Field.cpp. References Field::Table::corner, Field::Table::length, lines, NDECLARE_DEBUGDRAWING, NLINE, Field::Table::numberOfEntries, Pose2D::translation, Vector2< V >::x, Vector2< V >::y, and Vector2< double >::y. |
|
|
Definition at line 74 of file Field.h. Referenced by addPlayer(), clip(), draw(), Field(), getClosestPoint(), getDistance(), getDistanceToOwnPenaltyArea(), isReallyInside(), and placePlayers(). |
1.3.6