#include <iso_flock_boundary_repulsion_behavior.h>
Inherits iso::flock::Behavior.
Inheritance diagram for iso::flock::BoundaryRepulsionBehavior:
Public Member Functions | |
BoundaryRepulsionBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString) | |
create behavior | |
BoundaryRepulsionBehavior (Agent *pAgent, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString) throw (FlockException) | |
create behavior | |
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 | |
~BoundaryRepulsionBehavior () | |
destructor | |
void | act () |
perform behavior | |
Protected Attributes | |
Parameter * | mPositionPar |
Parameter * | mForcePar |
position parameter (input) | |
Parameter * | mLowerBoundaryPar |
force parameter (output) | |
Parameter * | mUpperBoundaryPar |
lower boundary parameter (internal) | |
Parameter * | mMaxDistPar |
upper boundary parameter (internal) | |
Parameter * | mAmountPar |
maximum distance parameter (internal) | |
math::Vector< real > | mTmpForce |
behavior amount parameter (internal) |
boundary for Agent 's position
Behavior creates repulsive boundary for Agent 's position.
The behavior is normally meant to restrict an Agent 's position to a cubic region
by pusing the agent away from the cube's boundaries.
Input Parameter:
type: position dim: nD neighbors: ignore
Output Parameter:
type: force dim: nD write: add
Internal Parameter:
name: xxx_lowerBoundary dim: nD defaultValue: -1.0
name: xxx_upperBoundary dim: nD 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/22/07.
BoundaryRepulsionBehavior::BoundaryRepulsionBehavior | ( | const base::String & | pInputParameterString, | |
const base::String & | pOutputParameterString | |||
) |
create behavior
pInputParameterString | input parameter string (parameters are space separated) | |
pOutputParameterString | output paramaters are space separated) |
BoundaryRepulsionBehavior::BoundaryRepulsionBehavior | ( | 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 |
BoundaryRepulsionBehavior::~BoundaryRepulsionBehavior | ( | ) |
destructor
Behavior * BoundaryRepulsionBehavior::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 * BoundaryRepulsionBehavior::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 BoundaryRepulsionBehavior::act | ( | ) | [virtual] |
position parameter (input)
force parameter (output)
lower boundary parameter (internal)
upper boundary parameter (internal)
maximum distance parameter (internal)
math::Vector<real> iso::flock::BoundaryRepulsionBehavior::mTmpForce [protected] |
behavior amount parameter (internal)