iso::flock::AccelerationBehavior Class Reference

acceleration behavior More...

#include <iso_flock_acceleration_behavior.h>

Inherits iso::flock::Behavior.

Inheritance diagram for iso::flock::AccelerationBehavior:

Inheritance graph
[legend]
Collaboration diagram for iso::flock::AccelerationBehavior:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AccelerationBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString)
 create behavior
 AccelerationBehavior (Agent *pAgent, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString) throw (FlockException)
 create behavior
 ~AccelerationBehavior ()
 destructor
virtual Behaviorcreate (const base::String &pBehaviorName, Agent *pAgent) const throw (FlockException)
 create copy of behavior
virtual Behaviorcreate (const base::String &pInputParameterString, const base::String &pOutputParameterString) const
 create copy of behavior
virtual void act ()
 perform behavior action

Protected Attributes

ParametermMassPar
ParametermVelocityPar
 mass parameter (input)
ParametermForcePar
 velocity parameter (input)
ParametermAcceleration
 force parameter (input)
ParametermMaxLinearAccelerationPar
 acceleration parameter (output)
ParametermMaxAngularAccelerationPar
 maximum linear acceleration parameter (internal)
math::Vector< realmPrefAccel
 maximum angular acceleration parameter (internal)
math::Vector< realmLinearAccel
 preferred acceleration
math::Vector< realmAngularAccel
 linear acceleration

Detailed Description

acceleration behavior

Behavior for calculating an Agent 's acceleration from a force acting on it.
can limit the resulting acceleration by clamping its linear and angular components.

Input Parameter:
type: mass dim: 1D neighbors: ignore
type: velocity dim: nD neighbors: ignore
type: force dim: nD neighbors: ignore

Output Parameter:
type: acceleration dim: nD write: replace

Internal Parameter:
name: xxx_maxLinearAcceleration dim: 1D defaultValue: 0.5
name: xxx_maxAngularAcceleration dim: 1D defaultValue: 0.5
name: xxx_active dim: 1D defaultValue: 1.0

Created by Daniel Bisig on 4/17/07.


Constructor & Destructor Documentation

AccelerationBehavior::AccelerationBehavior ( const base::String &  pInputParameterString,
const base::String &  pOutputParameterString 
)

create behavior

Parameters:
pInputParameterString input parameter string (parameters are space separated)
pOutputParameterString output paramaters are space separated)

AccelerationBehavior::AccelerationBehavior ( Agent pAgent,
const base::String &  pBehaviorName,
const base::String &  pInputParameterString,
const base::String &  pOutputParameterString 
) throw (FlockException)

create behavior

Parameters:
pAgent agent this behavior belongs to
pBehaviorName name of behavior
pInputParameterString input parameter string (parameters are space separated)
pOutputParameterString output paramaters are space separated)
Exceptions:
FlockException wrong number of type of parameters

AccelerationBehavior::~AccelerationBehavior (  ) 

destructor


Member Function Documentation

Behavior * AccelerationBehavior::create ( const base::String &  pBehaviorName,
Agent pAgent 
) const throw (FlockException) [virtual]

create copy of behavior

Parameters:
pAgent agent this behavior belongs to
pBehaviorName name of behavior
Returns:
new behavior
Exceptions:
FlockException wrong number of type of parameters

Implements iso::flock::Behavior.

Behavior * AccelerationBehavior::create ( const base::String &  pInputParameterString,
const base::String &  pOutputParameterString 
) const [virtual]

create copy of behavior

Parameters:
pInputParameterString input parameter string
pOutputParameterString output parameter string
Returns:
new behavior

Implements iso::flock::Behavior.

void AccelerationBehavior::act (  )  [virtual]

perform behavior action

Implements iso::flock::Behavior.


Member Data Documentation

Parameter* iso::flock::AccelerationBehavior::mMassPar [protected]

Parameter* iso::flock::AccelerationBehavior::mVelocityPar [protected]

mass parameter (input)

Parameter* iso::flock::AccelerationBehavior::mForcePar [protected]

velocity parameter (input)

Parameter* iso::flock::AccelerationBehavior::mAcceleration [protected]

force parameter (input)

Parameter* iso::flock::AccelerationBehavior::mMaxLinearAccelerationPar [protected]

acceleration parameter (output)

Parameter* iso::flock::AccelerationBehavior::mMaxAngularAccelerationPar [protected]

maximum linear acceleration parameter (internal)

math::Vector<real> iso::flock::AccelerationBehavior::mPrefAccel [protected]

maximum angular acceleration parameter (internal)

math::Vector<real> iso::flock::AccelerationBehavior::mLinearAccel [protected]

preferred acceleration

math::Vector<real> iso::flock::AccelerationBehavior::mAngularAccel [protected]

linear acceleration


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 15:28:02 2011 for iso_flock by  doxygen 1.5.1