FastEcslent::Flock Class Reference

#include <flock.h>

Inheritance diagram for FastEcslent::Flock:

FastEcslent::Tactic FastEcslent::Tactic FastEcslent::Tactic FastEcslent::Tactic FastEcslent::Tactic FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command FastEcslent::Command

List of all members.

Public Member Functions

 Flock (Group *grp, GroupTarget *tgt)
bool done ()
void init ()
void tick (double dt)
void postProcess ()
virtual Commandclone ()
int closestToTarget (bool closest)
int mostMassive (bool massivest)
 Flock (Group *grp, GroupTarget *tgt)
bool done ()
void init ()
void tick (double dt)
void postProcess ()
int closestToTarget (bool closest)
int mostMassive (bool massivest)
 Flock (Group *grp, GroupTarget *tgt)
bool done ()
void init ()
void tick (double dt)
void postProcess ()
int closestToTarget (bool closest)
int mostMassive (bool massivest)
 Flock (Group *grp, GroupTarget *tgt)
bool done ()
void init ()
void tick (double dt)
void postProcess ()
int closestToTarget (bool closest)
int mostMassive (bool massivest)
 Flock (Group *grp, GroupTarget *tgt)
bool done ()
void init ()
void tick (double dt)
void postProcess ()
int closestToTarget (bool closest)
int mostMassive (bool massivest)

Private Member Functions

bool valid (Group *grp)
Ogre::Vector3 cohesion (int i)
Ogre::Vector3 alignment (int i)
void computeSeparation (int leaderIndex)
void applyForces (int leaderIndex)
void bringWithinNeighborhood ()
bool valid (Group *grp)
Ogre::Vector3 cohesion (int i)
Ogre::Vector3 alignment (int i)
void computeSeparation (int leaderIndex)
void applyForces (int leaderIndex)
void bringWithinNeighborhood ()
bool valid (Group *grp)
Ogre::Vector3 cohesion (int i)
Ogre::Vector3 alignment (int i)
void computeSeparation (int leaderIndex)
void applyForces (int leaderIndex)
void bringWithinNeighborhood ()
bool valid (Group *grp)
Ogre::Vector3 cohesion (int i)
Ogre::Vector3 alignment (int i)
void computeSeparation (int leaderIndex)
void applyForces (int leaderIndex)
void bringWithinNeighborhood ()
bool valid (Group *grp)
Ogre::Vector3 cohesion (int i)
Ogre::Vector3 alignment (int i)
void computeSeparation (int leaderIndex)
void applyForces (int leaderIndex)
void bringWithinNeighborhood ()

Private Attributes

Ogre::Vector3 avgPos
Ogre::Vector3 avgVel
Ogre::Vector3 force
float CohesionParameter
float AlignmentParameter
float SeparationParameter
float SeparationThreshold
float maxSpeedByAngle [MaxEnts]
EntitynonNeighbors [MaxEnts]
int nNonNeighbors
Ogre::Vector3 forces [MaxEnts]
Entity ** members
int nMembers
int nEnts
DistanceMgrdistanceMgr
EntityMgrentityMgr
EntitynonNeighbors [MaxEnts]
Entity ** members
DistanceMgrdistanceMgr
EntityMgrentityMgr
EntitynonNeighbors [MaxEnts]
Entity ** members
DistanceMgrdistanceMgr
EntityMgrentityMgr
EntitynonNeighbors [MaxEnts]
Entity ** members
DistanceMgrdistanceMgr
EntityMgrentityMgr
EntitynonNeighbors [MaxEnts]
Entity ** members
DistanceMgrdistanceMgr
EntityMgrentityMgr


Detailed Description

Definition at line 24 of file flock.h.


Constructor & Destructor Documentation

FastEcslent::Flock::Flock ( Group grp,
GroupTarget tgt 
)

Definition at line 22 of file flock.cpp.

FastEcslent::Flock::Flock ( Group grp,
GroupTarget tgt 
)

FastEcslent::Flock::Flock ( Group grp,
GroupTarget tgt 
)

FastEcslent::Flock::Flock ( Group grp,
GroupTarget tgt 
)

FastEcslent::Flock::Flock ( Group grp,
GroupTarget tgt 
)


Member Function Documentation

bool FastEcslent::Flock::valid ( Group grp  )  [inline, private]

Definition at line 26 of file flock.h.

Ogre::Vector3 FastEcslent::Flock::cohesion ( int  i  )  [inline, private]

Definition at line 65 of file flock.cpp.

References avgPos, CohesionParameter, force, members, and FastEcslent::Entity::pos.

Referenced by tick().

Ogre::Vector3 FastEcslent::Flock::alignment ( int  i  )  [inline, private]

Definition at line 75 of file flock.cpp.

References AlignmentParameter, avgVel, force, members, and FastEcslent::Entity::vel.

Referenced by tick().

void FastEcslent::Flock::computeSeparation ( int  leaderIndex  )  [inline, private]

Definition at line 85 of file flock.cpp.

References FastEcslent::DistanceMgr::distance, distanceMgr, FastEcslent::Entity::entityId, entityMgr, FastEcslent::EntityMgr::ents, forces, FastEcslent::Identity::id, FastEcslent::Entity::mass, members, nEnts, nMembers, FastEcslent::DistanceMgr::normalizedDistanceVec, SeparationParameter, SeparationThreshold, and FastEcslent::Entity::speed.

Referenced by tick().

void FastEcslent::Flock::applyForces ( int  leaderIndex  )  [inline, private]

Definition at line 115 of file flock.cpp.

References FastEcslent::Entity::desiredHeading, FastEcslent::Entity::desiredSpeed, forces, maxSpeedByAngle, members, FastEcslent::Entity::minSpeed, nMembers, and FastEcslent::Entity::vel.

Referenced by tick().

void FastEcslent::Flock::bringWithinNeighborhood (  )  [private]

bool FastEcslent::Flock::done (  )  [inline, virtual]

Implements FastEcslent::Command.

Definition at line 28 of file flock.cpp.

void FastEcslent::Flock::init ( void   )  [virtual]

Implements FastEcslent::Command.

Definition at line 32 of file flock.cpp.

References AlignmentParameter, CohesionParameter, DEBUG, FastEcslent::Engine::distanceMgr, distanceMgr, FastEcslent::Group::engine, FastEcslent::Engine::entityMgr, entityMgr, FastEcslent::Tactic::group, FastEcslent::Group::leaderIndex, FastEcslent::Entity::maxSpeed, maxSpeedByAngle, FastEcslent::Group::members, members, FastEcslent::Entity::minSpeed, FastEcslent::Group::nEntitiesInGroup, FastEcslent::EntityMgr::nEnts, nEnts, nMembers, SeparationParameter, SeparationThreshold, and FastEcslent::Entity::uiname.

void FastEcslent::Flock::tick ( double  dt  )  [inline, virtual]

Implements FastEcslent::Command.

Definition at line 127 of file flock.cpp.

References alignment(), applyForces(), avgPos, avgVel, cohesion(), computeSeparation(), forces, FastEcslent::Tactic::group, FastEcslent::Group::leaderIndex, members, nMembers, FastEcslent::Entity::pos, and FastEcslent::Entity::vel.

void FastEcslent::Flock::postProcess (  )  [inline, virtual]

Implements FastEcslent::Command.

Definition at line 57 of file flock.h.

virtual Command* FastEcslent::Flock::clone (  )  [inline, virtual]

Reimplemented from FastEcslent::Command.

Definition at line 58 of file flock.h.

int FastEcslent::Flock::closestToTarget ( bool  closest  ) 

int FastEcslent::Flock::mostMassive ( bool  massivest  ) 

Reimplemented from FastEcslent::Tactic.

bool FastEcslent::Flock::valid ( Group grp  )  [inline, private]

Definition at line 26 of file flock.h.

Ogre::Vector3 FastEcslent::Flock::cohesion ( int  i  )  [private]

Ogre::Vector3 FastEcslent::Flock::alignment ( int  i  )  [private]

void FastEcslent::Flock::computeSeparation ( int  leaderIndex  )  [private]

void FastEcslent::Flock::applyForces ( int  leaderIndex  )  [private]

void FastEcslent::Flock::bringWithinNeighborhood (  )  [private]

bool FastEcslent::Flock::done (  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::init (  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::tick ( double  dt  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::postProcess (  )  [inline, virtual]

Implements FastEcslent::Command.

Definition at line 57 of file flock.h.

int FastEcslent::Flock::closestToTarget ( bool  closest  ) 

int FastEcslent::Flock::mostMassive ( bool  massivest  ) 

Reimplemented from FastEcslent::Tactic.

bool FastEcslent::Flock::valid ( Group grp  )  [inline, private]

Definition at line 26 of file flock.h.

Ogre::Vector3 FastEcslent::Flock::cohesion ( int  i  )  [private]

Ogre::Vector3 FastEcslent::Flock::alignment ( int  i  )  [private]

void FastEcslent::Flock::computeSeparation ( int  leaderIndex  )  [private]

void FastEcslent::Flock::applyForces ( int  leaderIndex  )  [private]

void FastEcslent::Flock::bringWithinNeighborhood (  )  [private]

bool FastEcslent::Flock::done (  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::init (  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::tick ( double  dt  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::postProcess (  )  [inline, virtual]

Implements FastEcslent::Command.

Definition at line 57 of file flock.h.

int FastEcslent::Flock::closestToTarget ( bool  closest  ) 

int FastEcslent::Flock::mostMassive ( bool  massivest  ) 

Reimplemented from FastEcslent::Tactic.

bool FastEcslent::Flock::valid ( Group grp  )  [inline, private]

Definition at line 26 of file flock.h.

Ogre::Vector3 FastEcslent::Flock::cohesion ( int  i  )  [private]

Ogre::Vector3 FastEcslent::Flock::alignment ( int  i  )  [private]

void FastEcslent::Flock::computeSeparation ( int  leaderIndex  )  [private]

void FastEcslent::Flock::applyForces ( int  leaderIndex  )  [private]

void FastEcslent::Flock::bringWithinNeighborhood (  )  [private]

bool FastEcslent::Flock::done (  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::init (  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::tick ( double  dt  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::postProcess (  )  [inline, virtual]

Implements FastEcslent::Command.

Definition at line 57 of file flock.h.

int FastEcslent::Flock::closestToTarget ( bool  closest  ) 

int FastEcslent::Flock::mostMassive ( bool  massivest  ) 

Reimplemented from FastEcslent::Tactic.

bool FastEcslent::Flock::valid ( Group grp  )  [inline, private]

Definition at line 26 of file flock.h.

Ogre::Vector3 FastEcslent::Flock::cohesion ( int  i  )  [private]

Ogre::Vector3 FastEcslent::Flock::alignment ( int  i  )  [private]

void FastEcslent::Flock::computeSeparation ( int  leaderIndex  )  [private]

void FastEcslent::Flock::applyForces ( int  leaderIndex  )  [private]

void FastEcslent::Flock::bringWithinNeighborhood (  )  [private]

bool FastEcslent::Flock::done (  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::init (  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::tick ( double  dt  )  [virtual]

Implements FastEcslent::Command.

void FastEcslent::Flock::postProcess (  )  [inline, virtual]

Implements FastEcslent::Command.

Definition at line 57 of file flock.h.

int FastEcslent::Flock::closestToTarget ( bool  closest  ) 

int FastEcslent::Flock::mostMassive ( bool  massivest  ) 

Reimplemented from FastEcslent::Tactic.


Member Data Documentation

Ogre::Vector3 FastEcslent::Flock::avgPos [private]

Definition at line 26 of file flock.h.

Referenced by cohesion(), and tick().

Ogre::Vector3 FastEcslent::Flock::avgVel [private]

Definition at line 28 of file flock.h.

Referenced by alignment(), and tick().

Ogre::Vector3 FastEcslent::Flock::force [private]

Definition at line 29 of file flock.h.

Referenced by alignment(), and cohesion().

float FastEcslent::Flock::CohesionParameter [private]

Definition at line 31 of file flock.h.

Referenced by cohesion(), and init().

float FastEcslent::Flock::AlignmentParameter [private]

Definition at line 33 of file flock.h.

Referenced by alignment(), and init().

float FastEcslent::Flock::SeparationParameter [private]

Definition at line 35 of file flock.h.

Referenced by computeSeparation(), and init().

float FastEcslent::Flock::SeparationThreshold [private]

Definition at line 36 of file flock.h.

Referenced by computeSeparation(), and init().

float FastEcslent::Flock::maxSpeedByAngle [private]

Definition at line 38 of file flock.h.

Referenced by applyForces(), and init().

Entity* FastEcslent::Flock::nonNeighbors[MaxEnts] [private]

Definition at line 41 of file flock.h.

int FastEcslent::Flock::nNonNeighbors [private]

Definition at line 42 of file flock.h.

Ogre::Vector3 FastEcslent::Flock::forces [private]

Definition at line 45 of file flock.h.

Referenced by applyForces(), computeSeparation(), and tick().

Entity** FastEcslent::Flock::members [private]

Definition at line 46 of file flock.h.

Referenced by alignment(), applyForces(), cohesion(), computeSeparation(), init(), and tick().

int FastEcslent::Flock::nMembers [private]

Definition at line 47 of file flock.h.

Referenced by applyForces(), computeSeparation(), init(), and tick().

int FastEcslent::Flock::nEnts [private]

Definition at line 48 of file flock.h.

Referenced by computeSeparation(), and init().

DistanceMgr* FastEcslent::Flock::distanceMgr [private]

Definition at line 49 of file flock.h.

Referenced by computeSeparation(), and init().

EntityMgr* FastEcslent::Flock::entityMgr [private]

Definition at line 50 of file flock.h.

Referenced by computeSeparation(), and init().

Entity* FastEcslent::Flock::nonNeighbors[MaxEnts] [private]

Definition at line 41 of file flock.h.

Entity** FastEcslent::Flock::members [private]

Definition at line 46 of file flock.h.

DistanceMgr* FastEcslent::Flock::distanceMgr [private]

Definition at line 49 of file flock.h.

EntityMgr* FastEcslent::Flock::entityMgr [private]

Definition at line 50 of file flock.h.

Entity* FastEcslent::Flock::nonNeighbors[MaxEnts] [private]

Definition at line 41 of file flock.h.

Entity** FastEcslent::Flock::members [private]

Definition at line 46 of file flock.h.

DistanceMgr* FastEcslent::Flock::distanceMgr [private]

Definition at line 49 of file flock.h.

EntityMgr* FastEcslent::Flock::entityMgr [private]

Definition at line 50 of file flock.h.

Entity* FastEcslent::Flock::nonNeighbors[MaxEnts] [private]

Definition at line 41 of file flock.h.

Entity** FastEcslent::Flock::members [private]

Definition at line 46 of file flock.h.

DistanceMgr* FastEcslent::Flock::distanceMgr [private]

Definition at line 49 of file flock.h.

EntityMgr* FastEcslent::Flock::entityMgr [private]

Definition at line 50 of file flock.h.

Entity* FastEcslent::Flock::nonNeighbors[MaxEnts] [private]

Definition at line 41 of file flock.h.

Entity** FastEcslent::Flock::members [private]

Definition at line 46 of file flock.h.

DistanceMgr* FastEcslent::Flock::distanceMgr [private]

Definition at line 49 of file flock.h.

EntityMgr* FastEcslent::Flock::entityMgr [private]

Definition at line 50 of file flock.h.


The documentation for this class was generated from the following files:
Generated on Fri Dec 13 14:54:21 2013 for FastECSLent by  doxygen 1.5.4