iso::flock::BoundaryWrapBehavior Class Reference

creates periodic boundary for Agent 's position More...

#include <iso_flock_boundary_wrap_behavior.h>

Inherits iso::flock::Behavior.

Inheritance diagram for iso::flock::BoundaryWrapBehavior:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BoundaryWrapBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString)
 create behavior
 BoundaryWrapBehavior (Agent *pAgent, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString) throw (FlockException)
 create behavior
 ~BoundaryWrapBehavior ()
 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
ParametermPositionOutPar
 position parameter (input)
ParametermLowerBoundaryPar
 position parameter (output)
ParametermUpperBoundaryPar
 lower boundary parameter (internal)

Detailed Description

creates periodic boundary for Agent 's position

boundary for Agent 's position

Behavior creates periodic boundary for Agent 's position.
The behavior is normally meant to restrict an Agent 's position to a cubic region
by mirroring the position to the opposite site of the cube whenever it exceeds the cube's boundaries.

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

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

Internal Parameter:
name: xxx_lowerBoundary dim: nD defaultValue: -1.0
name: xxx_upperBoundary dim: nD defaultValue: 1.0
name: xxx_active dim: 1D defaultValue: 1.0

Created by Daniel Bisig on 8/31/07.


Constructor & Destructor Documentation

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

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

BoundaryWrapBehavior::~BoundaryWrapBehavior (  ) 

destructor


Member Function Documentation

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

perform behavior

Implements iso::flock::Behavior.


Member Data Documentation

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

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

position parameter (input)

Parameter* iso::flock::BoundaryWrapBehavior::mLowerBoundaryPar [protected]

position parameter (output)

Parameter* iso::flock::BoundaryWrapBehavior::mUpperBoundaryPar [protected]

lower boundary parameter (internal)


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