FormationObject Class Reference

#include <FormationObject.h>

Inheritance diagram for FormationObject:

Object List of all members.

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 PfieldGeometricObjectgetGeometry () const
virtual PfieldGeometricObjectgetAbsGeometry () const
virtual void updateData ()
virtual ObjectgetCopy ()
void addSingleFormation (SingleFormation *formation)

Protected Attributes

std::vector< SingleFormation * > singleFormations

Detailed Description

A class representing a formation in a potential field

Definition at line 320 of file FormationObject.h.


Constructor & Destructor Documentation

FormationObject::FormationObject ( const std::string &  name  ) 

Constructor

Parameters:
name The name of the formation object

Definition at line 414 of file FormationObject.cpp.

Referenced by getCopy().

FormationObject::~FormationObject (  )  [virtual]

Destructor

Definition at line 420 of file FormationObject.cpp.

References singleFormations.


Member Function Documentation

void FormationObject::addSingleFormation ( SingleFormation formation  )  [inline]

Adds a new formation to his object

Parameters:
formation The formation

Definition at line 383 of file FormationObject.h.

References singleFormations.

Referenced by getCopy().

PfVec FormationObject::computeAbsFieldVecAt ( const PfPose otherPose  )  [virtual]

Computes the gradient of the formation at a given pose

Parameters:
otherPose The pose
Returns:
The gradient (= f'(otherPose))

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

Parameters:
otherPose The pose
Returns:
The charge (= f(otherPose))

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

Returns:
The geometric description

Reimplemented from Object.

Definition at line 369 of file FormationObject.h.

Object * FormationObject::getCopy (  )  [virtual]

Polymorph copy function

Returns:
A copy of the FormationObject

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

Returns:
The geometric description

Reimplemented from Object.

Definition at line 363 of file FormationObject.h.

PfPose FormationObject::getPose ( const PfPose robotPose  )  [virtual]

Returns the pose of the object in reference to the robot pose (used for getting a pose from formation objects)

Parameters:
robotPose The robot pose
Returns:
The object 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

Returns:
true, if active

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

Returns:
true, if the object is static

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.


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:31:44 2006 for DT2005.panorama by  doxygen 1.4.7