#include <iso_flock_spline_follow_behavior.h>
Inherits iso::flock::Behavior.
Inheritance diagram for iso::flock::SplineFollowBehavior:
Public Member Functions | |
SplineFollowBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString) | |
create behavior | |
SplineFollowBehavior (Agent *pAgent, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString) throw (FlockException) | |
create behavior | |
~SplineFollowBehavior () | |
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 > | mAvgDirection |
position neighbor group | |
int | mIndexSearchRange |
avg of neighboring value directions | |
int | mPointSearchRange |
space::SplineShape * | mPreviousSplineShape |
int | mPreviousSearchIndex |
unsigned int | mPreviousSplineCount |
unsigned int | mPreviousSplineIndex |
int * | mPreviousSplineShapes |
unsigned int * | mPreviousSplinePointCounts |
int * | mPreviousSearchIndexes |
real * | mPreviousDistances |
math::Vector< real > | mOcSearchPoint |
math::Vector< real > | mOcClosestPoint |
math::Vector< real > | mWcClosestPoint |
math::MatrixH< real > | mWc2ocMatrix |
math::Vector< real > | mOrtDirection |
math::Vector< real > | mTangDirection |
to move towards and along a spline shape
The Behavior causes Agent to move towards and along a spline shape.
The behavior requires that the Agent 's neighbors are actually spline shapes.
Input Parameter:
type: position dim: 3D neighbors: required (and must be spline shapes)
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 5/18/07.
SplineFollowBehavior::SplineFollowBehavior | ( | const base::String & | pInputParameterString, | |
const base::String & | pOutputParameterString | |||
) |
create behavior
pInputParameterString | input parameter string (parameters are space separated) | |
pOutputParameterString | output paramaters are space separated) |
SplineFollowBehavior::SplineFollowBehavior | ( | 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 |
SplineFollowBehavior::~SplineFollowBehavior | ( | ) |
destructor
Behavior * SplineFollowBehavior::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 * SplineFollowBehavior::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 SplineFollowBehavior::act | ( | ) | [virtual] |
Parameter* iso::flock::SplineFollowBehavior::mPositionPar [protected] |
Parameter* iso::flock::SplineFollowBehavior::mForcePar [protected] |
position parameter (input)
Parameter* iso::flock::SplineFollowBehavior::mMinDistPar [protected] |
force parameter (output)
Parameter* iso::flock::SplineFollowBehavior::mMaxDistPar [protected] |
minimum distance parameter (internal)
Parameter* iso::flock::SplineFollowBehavior::mAmountPar [protected] |
maximum distance parameter (internal)
space::NeighborGroup* iso::flock::SplineFollowBehavior::mPositionNeighbors [protected] |
behavior amount parameter (internal)
math::Vector<real> iso::flock::SplineFollowBehavior::mAvgDirection [protected] |
position neighbor group
int iso::flock::SplineFollowBehavior::mIndexSearchRange [protected] |
avg of neighboring value directions
int iso::flock::SplineFollowBehavior::mPointSearchRange [protected] |
space::SplineShape* iso::flock::SplineFollowBehavior::mPreviousSplineShape [protected] |
int iso::flock::SplineFollowBehavior::mPreviousSearchIndex [protected] |
unsigned int iso::flock::SplineFollowBehavior::mPreviousSplineCount [protected] |
unsigned int iso::flock::SplineFollowBehavior::mPreviousSplineIndex [protected] |
int* iso::flock::SplineFollowBehavior::mPreviousSplineShapes [protected] |
unsigned int* iso::flock::SplineFollowBehavior::mPreviousSplinePointCounts [protected] |
int* iso::flock::SplineFollowBehavior::mPreviousSearchIndexes [protected] |
real* iso::flock::SplineFollowBehavior::mPreviousDistances [protected] |
math::Vector<real> iso::flock::SplineFollowBehavior::mOcSearchPoint [protected] |
math::Vector<real> iso::flock::SplineFollowBehavior::mOcClosestPoint [protected] |
math::Vector<real> iso::flock::SplineFollowBehavior::mWcClosestPoint [protected] |
math::MatrixH<real> iso::flock::SplineFollowBehavior::mWc2ocMatrix [protected] |
math::Vector<real> iso::flock::SplineFollowBehavior::mOrtDirection [protected] |
math::Vector<real> iso::flock::SplineFollowBehavior::mTangDirection [protected] |