#include <FormationObject.h>
Inheritance diagram for BestFitFormation:
Public Member Functions | |
BestFitFormation () | |
Constructor. | |
~BestFitFormation () | |
Destructor. | |
bool | isActive () const |
Checks if the formation is active. | |
bool | isStatic () const |
Checks if the formation has a static position. | |
virtual PfVec | getPosition (const PfPose &robotPose) |
Returns the position of the formation in reference to the robot pose (used for A*-search to a formation). | |
PfVec | getVec (const PfPose &otherPose) |
Returns the field vector to/from a formation to/from a given pose. | |
double | getCharge (const PfPose &otherPose) |
Returns the field charge of the formation at a given pose. | |
void | addFormation (SingleFormation *formation) |
Adds a single formation to the set of formations. | |
void | setBestFitSelection (BestFitSelection bestFitSelection) |
Sets the criterion for choosing the best fitting formation. | |
SingleFormation * | copy () const |
Creates a copy of the formation object. | |
Protected Member Functions | |
virtual void | updateGeometry () |
Updates the positions of the formation. | |
int | findBestFormation (const PfPose &otherPose) |
Determines the best formation. | |
Protected Attributes | |
std::vector< SingleFormation * > | formations |
The set of formations. | |
std::vector< PfVec > | resultVecs |
A list of vectors corresponding to the formations. | |
std::vector< double > | resultDistances |
A list of distances corresponding to the formations. | |
BestFitSelection | bestFitSelection |
The selection criterion. |
Definition at line 235 of file FormationObject.h.
|
Constructor.
Definition at line 234 of file FormationObject.cpp. Referenced by copy(). |
|
Destructor.
Definition at line 239 of file FormationObject.cpp. References formations. |
|
Checks if the formation is active.
Reimplemented from SingleFormation. Definition at line 307 of file FormationObject.cpp. References formations. |
|
Checks if the formation has a static position.
Reimplemented from SingleFormation. Definition at line 250 of file FormationObject.cpp. References formations. |
|
Returns the position of the formation in reference to the robot pose (used for A*-search to a formation).
Reimplemented from SingleFormation. Definition at line 265 of file FormationObject.cpp. References findBestFormation(), and formations. |
Here is the call graph for this function:
|
Returns the field vector to/from a formation to/from a given pose.
Reimplemented from SingleFormation. Definition at line 279 of file FormationObject.cpp. References findBestFormation(), and formations. |
Here is the call graph for this function:
|
Returns the field charge of the formation at a given pose.
Reimplemented from SingleFormation. Definition at line 293 of file FormationObject.cpp. References findBestFormation(), and formations. |
Here is the call graph for this function:
|
Adds a single formation to the set of formations.
Definition at line 276 of file FormationObject.h. References formations, resultDistances, and resultVecs. Referenced by copy(), and Parser::parseFormationObject(). |
|
Sets the criterion for choosing the best fitting formation.
Definition at line 286 of file FormationObject.h. Referenced by Parser::parseFormationObject(). |
|
Creates a copy of the formation object.
Reimplemented from SingleFormation. Definition at line 397 of file FormationObject.cpp. References addFormation(), BestFitFormation(), bestFitSelection, formations, resultDistances, and resultVecs. |
Here is the call graph for this function:
|
Updates the positions of the formation.
Reimplemented from SingleFormation. Definition at line 305 of file FormationObject.h. |
|
Determines the best formation.
Definition at line 322 of file FormationObject.cpp. References bestFitSelection, formations, SELECT_MAX_GRADIENT, SELECT_MAX_PRIORITY, SELECT_MIN_DISTANCE, and SELECT_MIN_GRADIENT. Referenced by getCharge(), getPosition(), and getVec(). |
|
The set of formations.
Definition at line 296 of file FormationObject.h. Referenced by addFormation(), copy(), findBestFormation(), getCharge(), getPosition(), getVec(), isActive(), isStatic(), and ~BestFitFormation(). |
|
A list of vectors corresponding to the formations.
Definition at line 298 of file FormationObject.h. Referenced by addFormation(), and copy(). |
|
A list of distances corresponding to the formations.
Definition at line 300 of file FormationObject.h. Referenced by addFormation(), and copy(). |
|
The selection criterion.
Definition at line 302 of file FormationObject.h. Referenced by copy(), and findBestFormation(). |