#include <distanceMgr.h>
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 | |
Entity * | ent |
Entity * | other |
Entity * | ent |
Entity * | other |
Entity * | ent |
Entity * | other |
Entity * | ent |
Entity * | other |
Entity * | ent |
Entity * | other |
Classes | |
struct | CPA |
Definition at line 23 of file distanceMgr.h.
FastEcslent::DistanceMgr::DistanceMgr | ( | ) |
FastEcslent::DistanceMgr::DistanceMgr | ( | ) |
FastEcslent::DistanceMgr::DistanceMgr | ( | ) |
FastEcslent::DistanceMgr::DistanceMgr | ( | ) |
FastEcslent::DistanceMgr::DistanceMgr | ( | ) |
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().
Definition at line 43 of file distanceMgr.cpp.
References FastEcslent::EPSILON, FastEcslent::Entity::pos, and FastEcslent::Entity::vel.
Referenced by cpaSquaredDistance(), and tick().
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 | ) |
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 | ) |
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 | ) |
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 | ) |
Entity* FastEcslent::DistanceMgr::ent [private] |
Entity* FastEcslent::DistanceMgr::other [private] |
Ogre::Vector3 FastEcslent::DistanceMgr::distanceVec |
Ogre::Vector3 FastEcslent::DistanceMgr::normalizedDistanceVec |
Definition at line 42 of file distanceMgr.h.
Referenced by FastEcslent::Flock::computeSeparation(), tick(), and FastEcslent::PotentialMove::tick().
Definition at line 44 of file distanceMgr.h.
Referenced by FastEcslent::Flock::computeSeparation(), dumpOne(), isColliding(), tick(), and FastEcslent::PotentialMove::tick().
Definition at line 49 of file distanceMgr.h.
Referenced by init(), FastEcslent::Weapon::tick(), and tick().
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.