#include <iso_flock_spiral_behavior.h>
Inherits iso::flock::Behavior.
Inheritance diagram for iso::flock::SpiralBehavior:
Public Member Functions | |
SpiralBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString) | |
create behavior | |
SpiralBehavior (Agent *pAgent, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString) throw (FlockException) | |
create behavior | |
~SpiralBehavior () | |
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 * | mMinDistPar |
force parameter (output) | |
Parameter * | mMaxDistPar |
minimum distance parameter (internal) | |
Parameter * | mAmountPar |
maximum distance parameter (internal) | |
space::NeighborGroup * | mPositionNeighbors |
behavior amount parameter (internal) | |
math::Vector< real > | mTmpForce |
position neighbor group | |
math::Vector3< real > | mDirection1 |
temporary force | |
math::Vector3< real > | mDirection2 |
neighbor direction 1 |
to move in a spiral around center position of their neighbors
The Behavior causes Agent to move in a spiral around center position of their neighbors
Input Parameter:
type: position dim: 3D neighbors: required
Output Parameter:
type: force dim: 3D write: add
Internal Parameter:
name: xxx_minDist dim: 1D defaultValue: 0.0
name: xxx_maxDist dim: 1D defaultValue: 0.5
name: xxx_amount dim: 1D defaultValue: 0.1
name: xxx_active dim: 1D defaultValue: 1.0
Created by Daniel Bisig on 4/24/07.
SpiralBehavior::SpiralBehavior | ( | const base::String & | pInputParameterString, | |
const base::String & | pOutputParameterString | |||
) |
create behavior
pInputParameterString | input parameter string (parameters are space separated) | |
pOutputParameterString | output paramaters are space separated) |
SpiralBehavior::SpiralBehavior | ( | 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 |
SpiralBehavior::~SpiralBehavior | ( | ) |
destructor
Behavior * SpiralBehavior::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 * SpiralBehavior::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 SpiralBehavior::act | ( | ) | [virtual] |
Parameter* iso::flock::SpiralBehavior::mPositionPar [protected] |
Parameter* iso::flock::SpiralBehavior::mForcePar [protected] |
position parameter (input)
Parameter* iso::flock::SpiralBehavior::mMinDistPar [protected] |
force parameter (output)
Parameter* iso::flock::SpiralBehavior::mMaxDistPar [protected] |
minimum distance parameter (internal)
Parameter* iso::flock::SpiralBehavior::mAmountPar [protected] |
maximum distance parameter (internal)
space::NeighborGroup* iso::flock::SpiralBehavior::mPositionNeighbors [protected] |
behavior amount parameter (internal)
math::Vector<real> iso::flock::SpiralBehavior::mTmpForce [protected] |
position neighbor group
math::Vector3<real> iso::flock::SpiralBehavior::mDirection1 [protected] |
temporary force
math::Vector3<real> iso::flock::SpiralBehavior::mDirection2 [protected] |
neighbor direction 1