#include <FormationObject.h>
Inheritance diagram for FormationObject:
Public Member Functions | |
FormationObject (const std::string &name) | |
virtual | ~FormationObject () |
virtual PfPose | getPose (const PfPose &robotPose) |
virtual PfVec | computeAbsFieldVecAt (const PfPose &otherPose) |
virtual double | computeChargeAt (const PfPose &otherPose) |
virtual bool | isStatic () const |
virtual bool | isActive () const |
virtual PfieldGeometricObject * | getGeometry () const |
virtual PfieldGeometricObject * | getAbsGeometry () const |
virtual void | updateData () |
virtual Object * | getCopy () |
void | addSingleFormation (SingleFormation *formation) |
Protected Attributes | |
std::vector< SingleFormation * > | singleFormations |
Definition at line 320 of file FormationObject.h.
FormationObject::FormationObject | ( | const std::string & | name | ) |
Constructor
name | The name of the formation object |
Definition at line 414 of file FormationObject.cpp.
Referenced by getCopy().
FormationObject::~FormationObject | ( | ) | [virtual] |
void FormationObject::addSingleFormation | ( | SingleFormation * | formation | ) | [inline] |
Adds a new formation to his object
formation | The formation |
Definition at line 383 of file FormationObject.h.
References singleFormations.
Referenced by getCopy().
Computes the gradient of the formation at a given pose
otherPose | The pose |
Reimplemented from Object.
Definition at line 454 of file FormationObject.cpp.
References singleFormations.
double FormationObject::computeChargeAt | ( | const PfPose & | otherPose | ) | [virtual] |
Computes the "charge" of the formation at a given pose
otherPose | The pose |
Reimplemented from Object.
Definition at line 467 of file FormationObject.cpp.
References singleFormations.
virtual PfieldGeometricObject* FormationObject::getAbsGeometry | ( | ) | const [inline, virtual] |
Returns a pointer to the absolute geometry of the object
Reimplemented from Object.
Definition at line 369 of file FormationObject.h.
Object * FormationObject::getCopy | ( | ) | [virtual] |
Polymorph copy function
Reimplemented from Object.
Definition at line 510 of file FormationObject.cpp.
References addSingleFormation(), FormationObject(), Object::name, and singleFormations.
virtual PfieldGeometricObject* FormationObject::getGeometry | ( | ) | const [inline, virtual] |
Returns a pointer to the geometry of the object
Reimplemented from Object.
Definition at line 363 of file FormationObject.h.
Returns the pose of the object in reference to the robot pose (used for getting a pose from formation objects)
robotPose | The robot pose |
Reimplemented from Object.
Definition at line 432 of file FormationObject.cpp.
References d, dist(), PfPose::pos, and singleFormations.
bool FormationObject::isActive | ( | ) | const [virtual] |
Returns whether the object is active or not
Reimplemented from Object.
Definition at line 495 of file FormationObject.cpp.
References singleFormations.
bool FormationObject::isStatic | ( | ) | const [virtual] |
Return whether the object is static or not
Reimplemented from Object.
Definition at line 480 of file FormationObject.cpp.
References singleFormations.
virtual void FormationObject::updateData | ( | ) | [inline, virtual] |
Overrides function from Object, does nothing
Reimplemented from Object.
Definition at line 373 of file FormationObject.h.
std::vector< SingleFormation* > FormationObject::singleFormations [protected] |
The list of single formations belonging to this object
Definition at line 388 of file FormationObject.h.
Referenced by addSingleFormation(), computeAbsFieldVecAt(), computeChargeAt(), getCopy(), getPose(), isActive(), isStatic(), and ~FormationObject().