#include <iso_flock_damping_behavior.h>
Inherits iso::flock::Behavior.
Inheritance diagram for iso::flock::DampingBehavior:
Public Member Functions | |
DampingBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString) | |
create behavior | |
DampingBehavior (Agent *pAgent, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString) throw (FlockException) | |
create behavior | |
~DampingBehavior () | |
destructor | |
virtual Behavior * | create (const base::String &pBehaviorName, Agent *pAgent) const throw (FlockException) |
create copy of behavior | |
virtual Behavior * | create (const base::String &pInputParameterString, const base::String &pOutputParameterString) const |
create copy of behavior | |
void | act () |
perform behavior | |
Protected Attributes | |
Parameter * | mVelocityPar |
Parameter * | mForcePar |
velocity parameter (input) | |
Parameter * | mPrefVelocityPar |
force parameter (output) | |
Parameter * | mAmountPar |
preferred velocity parameter (internal) | |
math::Vector< real > | mTmpForce |
behavior amount parameter (internal) |
velocity towards target speed
The Behavior adapts Agent velocity towards target speed
Input Parameter:
type: velocity dim: nD neighbors: ignored
Output Parameter:
type: force dim: nD write: add
Internal Parameter:
name: xxx_prefVelocity dim: 1D defaultValue: 1.0
name: xxx_amount dim: 1D defaultValue: 0.1
name: xxx_active dim: 1D defaultValue: 1.0
Created by Daniel Bisig on 4/21/07.
DampingBehavior::DampingBehavior | ( | const base::String & | pInputParameterString, | |
const base::String & | pOutputParameterString | |||
) |
create behavior
pInputParameterString | input parameter string (parameters are space separated) | |
pOutputParameterString | output paramaters are space separated) |
DampingBehavior::DampingBehavior | ( | Agent * | pAgent, | |
const base::String & | pBehaviorName, | |||
const base::String & | pInputParameterString, | |||
const base::String & | pOutputParameterString | |||
) | throw (FlockException) |
create behavior
pAgent | agent this behavior belongs to | |
pBehaviorName | name of behavior | |
pInputParameterString | input parameter string (parameters are space separated) | |
pOutputParameterString | output paramaters are space separated) |
FlockException | wrong number of type of parameters |
DampingBehavior::~DampingBehavior | ( | ) |
destructor
Behavior * DampingBehavior::create | ( | const base::String & | pBehaviorName, | |
Agent * | pAgent | |||
) | const throw (FlockException) [virtual] |
create copy of behavior
pAgent | agent this behavior belongs to | |
pBehaviorName | name of behavior |
FlockException | wrong number of type of parameters |
Implements iso::flock::Behavior.
Behavior * DampingBehavior::create | ( | const base::String & | pInputParameterString, | |
const base::String & | pOutputParameterString | |||
) | const [virtual] |
create copy of behavior
pInputParameterString | input parameter string | |
pOutputParameterString | output parameter string |
Implements iso::flock::Behavior.
void DampingBehavior::act | ( | ) | [virtual] |
Parameter* iso::flock::DampingBehavior::mVelocityPar [protected] |
Parameter* iso::flock::DampingBehavior::mForcePar [protected] |
velocity parameter (input)
Parameter* iso::flock::DampingBehavior::mPrefVelocityPar [protected] |
force parameter (output)
Parameter* iso::flock::DampingBehavior::mAmountPar [protected] |
preferred velocity parameter (internal)
math::Vector<real> iso::flock::DampingBehavior::mTmpForce [protected] |
behavior amount parameter (internal)