Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# RelativeFormation Class Reference

A class representing a formation relative to another object. More...

`#include <FormationObject.h>`

Inheritance diagram for RelativeFormation:

[legend]
Collaboration diagram for RelativeFormation:

[legend]
List of all members.

## Public Member Functions
| RelativeFormation ()
| Constructor.
bool | isActive () const
| Checks if the formation is active.
void | setParameters (double angle, FormationCoordinates coordinates)
| Sets the two specific parameters of a RelativeFormation.
SingleFormation * | copy () const
| Creates a copy of the formation object.
## Protected Member Functions
virtual void | updateGeometry ()
| Updates the positions of the formation.
## Protected Attributes
double | angle
| The angle to the other object.
FormationCoordinates | coordinates
| The coordinate system used.

## Detailed Description

A class representing a formation relative to another object.

Definition at line 195 of file FormationObject.h.

## Constructor & Destructor Documentation

RelativeFormation::RelativeFormation | ( |  | ) |

| Constructor. Definition at line 192 of file FormationObject.cpp. References PotentialFieldsObject::setGeometry(). Referenced by copy().

Here is the call graph for this function:

## Member Function Documentation

bool RelativeFormation::isActive | ( |  | ) | const`[virtual]`

| Checks if the formation is active. Returns: true, if the formation is active Reimplemented from SingleFormation. Definition at line 200 of file FormationObject.cpp.

void RelativeFormation::setParameters | ( | double | angle,
|  | FormationCoordinates | coordinates
| ) | `[inline]`

  | Sets the two specific parameters of a RelativeFormation. Parameters:
  angle | The angle to the other object
  coordinates | The coordinate system used
Definition at line 210 of file FormationObject.h. Referenced by Parser::parseSingleFormation().

SingleFormation * RelativeFormation::copy | ( |  | ) | const`[virtual]`

| Creates a copy of the formation object. Returns: A pointer to a copy Reimplemented from SingleFormation. Definition at line 222 of file FormationObject.cpp. References angle, coordinates, SingleFormation::geometricFormationObject, SingleFormation::objects, RelativeFormation(), and SingleFormation::robotPosition.

Here is the call graph for this function:

void RelativeFormation::updateGeometry | ( |  | ) | `[protected, virtual]`

| Updates the positions of the formation. Reimplemented from SingleFormation. Definition at line 206 of file FormationObject.cpp. References coordinates, PfVec::distanceTo(), PotentialFieldsObject::getGeometry(), Line::p1, Line::p2, PfPose::pos, RELATIVE_FORMATION, PfVec::rotate(), and PfPose::rotation.

Here is the call graph for this function:

## Member Data Documentation

double RelativeFormation::angle`[protected]`

| The angle to the other object. Definition at line 220 of file FormationObject.h. Referenced by copy().

FormationCoordinates RelativeFormation::coordinates`[protected]`

| The coordinate system used. Definition at line 222 of file FormationObject.h. Referenced by copy(), and updateGeometry().

The documentation for this class was generated from the following files:

- Tools/PotentialFields/FormationObject.h
- Tools/PotentialFields/FormationObject.cpp