iso::flock::ConeVisionBehavior Class Reference

cone vision behavior More...

#include <iso_flock_cone_vision_behavior.h>

Inherits iso::flock::Behavior.

Inheritance diagram for iso::flock::ConeVisionBehavior:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ConeVisionBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString)
 create behavior
 ConeVisionBehavior (Agent *pAgent, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString) throw (FlockException)
 create behavior
 ~ConeVisionBehavior ()
 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
void act ()
 perform behavior

Protected Attributes

ParametermPositionInPar
ParametermVelocityPar
 position parameter (input)
ParametermPositionOutPar
 velocity parameter (input)
ParametermVisionAnglePar
 position parameter (output)
space::NeighborGroup * mPositionInNeighbors
 force parameter (internal)
space::NeighborGroup * mPositionOutNeighbors
 position neighbor group
math::Vector< realmNormVelocity
 position neighbor group
math::Vector< realmNormNeighborDirection

Detailed Description

cone vision behavior

behavior

The behavior implements cone vision for agents.
It does so by copying those neighbors from an input neighbor group into an output neighbor group that fall within the interior of an agent's vision cone.
. The tip of vision cone is placed at the agent's position and oriented in the direction of the agent's velocity.

Input Parameter:
type: position dim: nD neighbors: required
type: velocity dim: nD neighbors: ignore

Output Parameter:
type: position dim: nD neighbors: required

Internal Parameter:
name: xxx_visionAngle dim: 1D defaultValue: 0.0

Created by Daniel Bisig on 4/15/09.


Constructor & Destructor Documentation

ConeVisionBehavior::ConeVisionBehavior ( 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)

ConeVisionBehavior::ConeVisionBehavior ( 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

ConeVisionBehavior::~ConeVisionBehavior (  ) 

destructor


Member Function Documentation

Behavior * ConeVisionBehavior::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 * ConeVisionBehavior::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 ConeVisionBehavior::act (  )  [virtual]

perform behavior

Implements iso::flock::Behavior.


Member Data Documentation

Parameter* iso::flock::ConeVisionBehavior::mPositionInPar [protected]

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

position parameter (input)

Parameter* iso::flock::ConeVisionBehavior::mPositionOutPar [protected]

velocity parameter (input)

Parameter* iso::flock::ConeVisionBehavior::mVisionAnglePar [protected]

position parameter (output)

space::NeighborGroup* iso::flock::ConeVisionBehavior::mPositionInNeighbors [protected]

force parameter (internal)

space::NeighborGroup* iso::flock::ConeVisionBehavior::mPositionOutNeighbors [protected]

position neighbor group

math::Vector<real> iso::flock::ConeVisionBehavior::mNormVelocity [protected]

position neighbor group

math::Vector<real> iso::flock::ConeVisionBehavior::mNormNeighborDirection [protected]


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