FastEcslent::DistanceMgr Class Reference

#include <distanceMgr.h>

Inheritance diagram for FastEcslent::DistanceMgr:

FastEcslent::Mgr FastEcslent::Mgr FastEcslent::Mgr FastEcslent::Mgr FastEcslent::Mgr

List of all members.

Public Member Functions

 DistanceMgr (Engine *eng, Options opts)
 DistanceMgr ()
void init ()
void tick (double dtime)
void dumpAll ()
void dumpOne (int i)
bool isColliding (const Entity *ent, double collisionDistThreshold)
bool wouldCollide (Ogre::Vector3 pos, double collisionDistThreshold)
float cpaTime (const Entity *ent1, const Entity *ent2)
float cpaSquaredDistance (const Entity *ent1, const Entity *ent2)
 DistanceMgr (Engine *eng, Options opts)
 DistanceMgr ()
void init ()
void tick (double dtime)
void dumpAll ()
void dumpOne (int i)
float cpaTime (const Entity *ent1, const Entity *ent2)
float cpaSquaredDistance (const Entity *ent1, const Entity *ent2)
 DistanceMgr (Engine *eng, Options opts)
 DistanceMgr ()
void init ()
void tick (double dtime)
void dumpAll ()
void dumpOne (int i)
float cpaTime (const Entity *ent1, const Entity *ent2)
float cpaSquaredDistance (const Entity *ent1, const Entity *ent2)
 DistanceMgr (Engine *eng, Options opts)
 DistanceMgr ()
void init ()
void tick (double dtime)
void dumpAll ()
void dumpOne (int i)
float cpaTime (const Entity *ent1, const Entity *ent2)
float cpaSquaredDistance (const Entity *ent1, const Entity *ent2)
 DistanceMgr (Engine *eng, Options opts)
 DistanceMgr ()
void init ()
void tick (double dtime)
void dumpAll ()
void dumpOne (int i)
float cpaTime (const Entity *ent1, const Entity *ent2)
float cpaSquaredDistance (const Entity *ent1, const Entity *ent2)

Public Attributes

Options options
CPA cpa [MaxEnts][MaxEnts]
Ogre::Vector3 distanceVec [MaxEnts][MaxEnts]
Ogre::Vector3 normalizedDistanceVec [MaxEnts][MaxEnts]
double distance [MaxEnts][MaxEnts]
int collisions [MaxEnts]
double closestEnemyDistance [MaxEnts]
int closestEnemy [MaxEnts]
int furthestEnt [MaxEnts]
double furthestDistance [MaxEnts]
int collisionTotal
double potential [MaxEnts][MaxEnts]

Private Attributes

Entityent
Entityother
Entityent
Entityother
Entityent
Entityother
Entityent
Entityother
Entityent
Entityother

Classes

struct  CPA


Detailed Description

Definition at line 23 of file distanceMgr.h.


Constructor & Destructor Documentation

FastEcslent::DistanceMgr::DistanceMgr ( Engine eng,
Options  opts 
)

Definition at line 20 of file distanceMgr.cpp.

References options.

FastEcslent::DistanceMgr::DistanceMgr (  ) 

FastEcslent::DistanceMgr::DistanceMgr ( Engine eng,
Options  opts 
)

FastEcslent::DistanceMgr::DistanceMgr (  ) 

FastEcslent::DistanceMgr::DistanceMgr ( Engine eng,
Options  opts 
)

FastEcslent::DistanceMgr::DistanceMgr (  ) 

FastEcslent::DistanceMgr::DistanceMgr ( Engine eng,
Options  opts 
)

FastEcslent::DistanceMgr::DistanceMgr (  ) 

FastEcslent::DistanceMgr::DistanceMgr ( Engine eng,
Options  opts 
)

FastEcslent::DistanceMgr::DistanceMgr (  ) 


Member Function Documentation

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

Reimplemented from FastEcslent::Mgr.

Definition at line 25 of file distanceMgr.cpp.

References closestEnemy, closestEnemyDistance, collisions, collisionTotal, furthestDistance, furthestEnt, and FastEcslent::MaxEnts.

Referenced by FastEcslent::Engine::init().

void FastEcslent::DistanceMgr::tick ( double  dtime  )  [virtual]

Reimplemented from FastEcslent::Mgr.

Definition at line 97 of file distanceMgr.cpp.

References FastEcslent::ALIVE, closestEnemy, closestEnemyDistance, cpa, cpaSquaredDistance(), FastEcslent::DistanceMgr::CPA::cpaSquaredDistance, cpaTime(), FastEcslent::DistanceMgr::CPA::cpaTime, distance, distanceVec, FastEcslent::Mgr::engine, ent, FastEcslent::Entity::entityId, FastEcslent::Engine::entityMgr, FastEcslent::Entity::entityState, FastEcslent::EntityMgr::ents, furthestDistance, furthestEnt, FastEcslent::Identity::id, FastEcslent::EntityMgr::nEnts, FastEcslent::NEUTRAL, normalizedDistanceVec, other, FastEcslent::Entity::pos, and FastEcslent::Identity::side.

Referenced by FastEcslent::Engine::tickAll().

void FastEcslent::DistanceMgr::dumpAll (  ) 

Definition at line 163 of file distanceMgr.cpp.

References dumpOne(), FastEcslent::Mgr::engine, FastEcslent::Engine::entityMgr, and FastEcslent::EntityMgr::nEnts.

Referenced by FastEcslent::Engine::runTests().

void FastEcslent::DistanceMgr::dumpOne ( int  i  ) 

Definition at line 169 of file distanceMgr.cpp.

References DEBUG, distance, FastEcslent::Mgr::engine, FastEcslent::Engine::entityMgr, and FastEcslent::EntityMgr::nEnts.

Referenced by dumpAll().

bool FastEcslent::DistanceMgr::isColliding ( const Entity ent,
double  collisionDistThreshold 
)

Definition at line 60 of file distanceMgr.cpp.

References distance, FastEcslent::Mgr::engine, FastEcslent::Entity::entityId, FastEcslent::Engine::entityMgr, FastEcslent::Identity::id, and FastEcslent::EntityMgr::nEnts.

bool FastEcslent::DistanceMgr::wouldCollide ( Ogre::Vector3  pos,
double  collisionDistThreshold 
)

Definition at line 73 of file distanceMgr.cpp.

References FastEcslent::Mgr::engine, FastEcslent::Engine::entityMgr, FastEcslent::EntityMgr::ents, FastEcslent::EntityMgr::nEnts, and FastEcslent::Entity::pos.

Referenced by FastEcslent::Builder::selectRandPosInRadius().

float FastEcslent::DistanceMgr::cpaTime ( const Entity ent1,
const Entity ent2 
)

Definition at line 43 of file distanceMgr.cpp.

References FastEcslent::EPSILON, FastEcslent::Entity::pos, and FastEcslent::Entity::vel.

Referenced by cpaSquaredDistance(), and tick().

float FastEcslent::DistanceMgr::cpaSquaredDistance ( const Entity ent1,
const Entity ent2 
)

Definition at line 53 of file distanceMgr.cpp.

References cpaTime(), FastEcslent::Entity::pos, and FastEcslent::Entity::vel.

Referenced by tick().

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

Reimplemented from FastEcslent::Mgr.

void FastEcslent::DistanceMgr::tick ( double  dtime  )  [virtual]

Reimplemented from FastEcslent::Mgr.

void FastEcslent::DistanceMgr::dumpAll (  ) 

void FastEcslent::DistanceMgr::dumpOne ( int  i  ) 

float FastEcslent::DistanceMgr::cpaTime ( const Entity ent1,
const Entity ent2 
)

float FastEcslent::DistanceMgr::cpaSquaredDistance ( const Entity ent1,
const Entity ent2 
)

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

Reimplemented from FastEcslent::Mgr.

void FastEcslent::DistanceMgr::tick ( double  dtime  )  [virtual]

Reimplemented from FastEcslent::Mgr.

void FastEcslent::DistanceMgr::dumpAll (  ) 

void FastEcslent::DistanceMgr::dumpOne ( int  i  ) 

float FastEcslent::DistanceMgr::cpaTime ( const Entity ent1,
const Entity ent2 
)

float FastEcslent::DistanceMgr::cpaSquaredDistance ( const Entity ent1,
const Entity ent2 
)

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

Reimplemented from FastEcslent::Mgr.

void FastEcslent::DistanceMgr::tick ( double  dtime  )  [virtual]

Reimplemented from FastEcslent::Mgr.

void FastEcslent::DistanceMgr::dumpAll (  ) 

void FastEcslent::DistanceMgr::dumpOne ( int  i  ) 

float FastEcslent::DistanceMgr::cpaTime ( const Entity ent1,
const Entity ent2 
)

float FastEcslent::DistanceMgr::cpaSquaredDistance ( const Entity ent1,
const Entity ent2 
)

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

Reimplemented from FastEcslent::Mgr.

void FastEcslent::DistanceMgr::tick ( double  dtime  )  [virtual]

Reimplemented from FastEcslent::Mgr.

void FastEcslent::DistanceMgr::dumpAll (  ) 

void FastEcslent::DistanceMgr::dumpOne ( int  i  ) 

float FastEcslent::DistanceMgr::cpaTime ( const Entity ent1,
const Entity ent2 
)

float FastEcslent::DistanceMgr::cpaSquaredDistance ( const Entity ent1,
const Entity ent2 
)


Member Data Documentation

Entity* FastEcslent::DistanceMgr::ent [private]

Definition at line 27 of file distanceMgr.h.

Referenced by tick().

Entity* FastEcslent::DistanceMgr::other [private]

Definition at line 28 of file distanceMgr.h.

Referenced by tick().

Options FastEcslent::DistanceMgr::options

Definition at line 32 of file distanceMgr.h.

Referenced by DistanceMgr().

CPA FastEcslent::DistanceMgr::cpa

Definition at line 40 of file distanceMgr.h.

Referenced by tick().

Ogre::Vector3 FastEcslent::DistanceMgr::distanceVec

Definition at line 41 of file distanceMgr.h.

Referenced by tick().

Ogre::Vector3 FastEcslent::DistanceMgr::normalizedDistanceVec

Definition at line 42 of file distanceMgr.h.

Referenced by FastEcslent::Flock::computeSeparation(), tick(), and FastEcslent::PotentialMove::tick().

double FastEcslent::DistanceMgr::distance

Definition at line 44 of file distanceMgr.h.

Referenced by FastEcslent::Flock::computeSeparation(), dumpOne(), isColliding(), tick(), and FastEcslent::PotentialMove::tick().

int FastEcslent::DistanceMgr::collisions

Definition at line 45 of file distanceMgr.h.

Referenced by init().

double FastEcslent::DistanceMgr::closestEnemyDistance

Definition at line 47 of file distanceMgr.h.

Referenced by init(), and tick().

int FastEcslent::DistanceMgr::closestEnemy

Definition at line 49 of file distanceMgr.h.

Referenced by init(), FastEcslent::Weapon::tick(), and tick().

int FastEcslent::DistanceMgr::furthestEnt

Definition at line 51 of file distanceMgr.h.

Referenced by init(), and tick().

double FastEcslent::DistanceMgr::furthestDistance

Definition at line 52 of file distanceMgr.h.

Referenced by init(), and tick().

int FastEcslent::DistanceMgr::collisionTotal

Definition at line 54 of file distanceMgr.h.

Referenced by init().

double FastEcslent::DistanceMgr::potential

Definition at line 55 of file distanceMgr.h.

Entity* FastEcslent::DistanceMgr::ent [private]

Definition at line 27 of file distanceMgr.h.

Entity* FastEcslent::DistanceMgr::other [private]

Definition at line 28 of file distanceMgr.h.

Entity* FastEcslent::DistanceMgr::ent [private]

Definition at line 27 of file distanceMgr.h.

Entity* FastEcslent::DistanceMgr::other [private]

Definition at line 28 of file distanceMgr.h.

Entity* FastEcslent::DistanceMgr::ent [private]

Definition at line 27 of file distanceMgr.h.

Entity* FastEcslent::DistanceMgr::other [private]

Definition at line 28 of file distanceMgr.h.

Entity* FastEcslent::DistanceMgr::ent [private]

Definition at line 27 of file distanceMgr.h.

Entity* FastEcslent::DistanceMgr::other [private]

Definition at line 28 of file distanceMgr.h.


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