A velocity modifier which adapts agent preferred velocities so that they move in formations.
More...
#include <FormationsModifier.h>
A velocity modifier which adapts agent preferred velocities so that they move in formations.
Formations::FormationModifier::FormationModifier |
( |
FormationPtr |
form | ) |
|
Constructor for given Formation.
- Parameters
-
form | A managed pointer to formation data |
void Formations::FormationModifier::adaptPrefVelocity |
( |
const Agents::BaseAgent * |
agent, |
|
|
Agents::PrefVelocity & |
pVel |
|
) |
| |
Adapt the input preferred velocity according to the formation.
- Parameters
-
agent | The agent whose preferred velocity is provided. |
pVel | The preferred velocity to modify – modified in place. |
BFSM::Task * Formations::FormationModifier::getTask |
( |
| ) |
|
|
virtual |
Provides the task the formation modifier uses to update formations.
- Returns
- A pointer to the supporting task. The caller is responsible to delete it.
void Formations::FormationModifier::setFormation |
( |
FormationPtr |
form | ) |
|
Set the formation data.
- Parameters
-
form | A managed resource pointer to the underlying formation data. |
Provides a display context for interacting with this velocity modifier.
It is the responsibility of the caller to delete the provided context.
- Returns
- A pointer to a context for this velocity modifier
The documentation for this class was generated from the following files: