#include <iso_flock_evasion_behavior.h>
Inherits iso::flock::Behavior.
Inheritance diagram for iso::flock::EvasionBehavior:
Public Member Functions | |
EvasionBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString) | |
create behavior | |
EvasionBehavior (Agent *pAgent, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString) throw (FlockException) | |
create behavior | |
~EvasionBehavior () | |
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 * | mPositionPar |
Parameter * | mForcePar |
position parameter (input) | |
Parameter * | mMaxDistPar |
force parameter (output) | |
Parameter * | mAmountPar |
minimum distance parameter (internal) | |
space::NeighborGroup * | mPositionNeighbors |
behavior amount parameter (internal) | |
math::Vector< real > | mTmpForce |
position neighbor group |
to move away from their neighbors
The Behavior causes Agent to move away from their neighbors
Input Parameter:
type: position dim: nD neighbors: required
Output Parameter:
type: force dim: nD write: add
Internal Parameter:
name: xxx_maxDist dim: 1D defaultValue: 0.2
name: xxx_amount dim: 1D defaultValue: 0.1
name: xxx_active dim: 1D defaultValue: 1.0
Created by Daniel Bisig on 4/21/07.
EvasionBehavior::EvasionBehavior | ( | const base::String & | pInputParameterString, | |
const base::String & | pOutputParameterString | |||
) |
create behavior
pInputParameterString | input parameter string (parameters are space separated) | |
pOutputParameterString | output paramaters are space separated) |
EvasionBehavior::EvasionBehavior | ( | 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 |
EvasionBehavior::~EvasionBehavior | ( | ) |
destructor
Behavior * EvasionBehavior::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 * EvasionBehavior::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 EvasionBehavior::act | ( | ) | [virtual] |
Parameter* iso::flock::EvasionBehavior::mPositionPar [protected] |
Parameter* iso::flock::EvasionBehavior::mForcePar [protected] |
position parameter (input)
Parameter* iso::flock::EvasionBehavior::mMaxDistPar [protected] |
force parameter (output)
Parameter* iso::flock::EvasionBehavior::mAmountPar [protected] |
minimum distance parameter (internal)
space::NeighborGroup* iso::flock::EvasionBehavior::mPositionNeighbors [protected] |
behavior amount parameter (internal)
math::Vector<real> iso::flock::EvasionBehavior::mTmpForce [protected] |
position neighbor group