FastEcslent::NetAspect Class Reference

#include <netAspect.h>

Inheritance diagram for FastEcslent::NetAspect:

FastEcslent::UnitAspect FastEcslent::UnitAspect FastEcslent::UnitAspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect

List of all members.

Public Member Functions

 NetAspect (Entity *ent, UnitAspectType at)
void init ()
void tick (double dt)
void lerpPos ()
void lerpRot ()
void updateEcslent (double dt)
void createEntity (EntityType entType, Ogre::Vector3 pos)
void squalch ()
void setEntityBeingBuilt (int entID)
 NetAspect (Entity *ent, UnitAspectType at)
void init ()
void tick (double dt)
void lerpPos ()
void lerpRot ()
void updateEcslent (double dt)
void squalch ()
 NetAspect (Entity *ent, UnitAspectType at)
void init ()
void tick (double dt)
void lerpPos ()
void lerpRot ()
void updateEcslent (double dt)
void squalch ()

Public Attributes

float ds
float dh
float SPEED_TOLERANCE
float HEADING_TOLERANCE
std::deque< State * > updateQueue
std::deque< State * > updateQueue
std::deque< State * > updateQueue

Private Member Functions

void initNetworking ()
void updateServer (float newDS, float newDH)
bool withinSpeedTolerance (float a, float b)
bool withinHeadingTolerance (float a, float b)
void squalchOtherClients ()
bool isValid (State *state)
void clearQueue (std::deque< State * > *queue, int size)
void setEntityBeingBuilt (Entity *ent)
bool checkPendingEntityId ()
void requestMineralPatchID ()
void initNetworking ()
void updateServer (float newDS, float newDH)
bool withinSpeedTolerance (float a, float b)
bool withinHeadingTolerance (float a, float b)
void squalchOtherClients ()
bool isValid (State *state)
void clearQueue (std::deque< State * > *queue, int size)
void initNetworking ()
void updateServer (float newDS, float newDH)
bool withinSpeedTolerance (float a, float b)
bool withinHeadingTolerance (float a, float b)
void squalchOtherClients ()
bool isValid (State *state)
void clearQueue (std::deque< State * > *queue, int size)

Private Attributes

int id
Ogre::Vector3 remoteVel
Ogre::Vector3 remotePos
Ogre::Vector3 nextRemotePos
Ogre::Vector3 nextPos
Ogre::Vector3 diffPos
Ogre::Vector3 diffPosFrac
Ogre::Quaternion remoteQuat
Ogre::Quaternion destOrie
Ogre::Quaternion srcOrie
Ogre::Quaternion finalDestOrie
float rotFactor
float rotProgress
int oldTime
float latency
float nSteps
Ogre::Quaternion qDelta
float deltaYaw
bool firstTick
State statusData
int pendingEntityId


Detailed Description

Definition at line 18 of file netAspect.h.


Constructor & Destructor Documentation

FastEcslent::NetAspect::NetAspect ( Entity ent,
UnitAspectType  at 
) [inline]

Definition at line 62 of file netAspect.h.

FastEcslent::NetAspect::NetAspect ( Entity ent,
UnitAspectType  at 
) [inline]

Definition at line 57 of file netAspect.h.

FastEcslent::NetAspect::NetAspect ( Entity ent,
UnitAspectType  at 
) [inline]

Definition at line 57 of file netAspect.h.


Member Function Documentation

void FastEcslent::NetAspect::initNetworking (  )  [private]

Definition at line 18 of file netAspect.cpp.

References clearQueue(), FastEcslent::Entity::desiredHeading, FastEcslent::Entity::desiredSpeed, dh, ds, FastEcslent::UnitAspect::entity, FastEcslent::Entity::entityType, latency, FastEcslent::Minerals::mineralPatchId, FastEcslent::MINERALS, nSteps, oldTime, FastEcslent::Entity::pos, remotePos, remoteVel, requestMineralPatchID(), rotFactor, rotProgress, FastEcslent::Entity::speed, statusData, updateQueue, and FastEcslent::Entity::yaw.

Referenced by tick().

void FastEcslent::NetAspect::updateServer ( float  newDS,
float  newDH 
) [private]

Definition at line 151 of file netAspect.cpp.

References FastEcslent::NetThread::addCommand(), FastEcslent::NetThread::addSquelch(), dh, ds, FastEcslent::Entity::engine, FastEcslent::UnitAspect::entity, FastEcslent::NetThread::getNetId(), FastEcslent::Engine::net, pi, withinHeadingTolerance(), and withinSpeedTolerance().

Referenced by tick().

bool FastEcslent::NetAspect::withinSpeedTolerance ( float  a,
float  b 
) [private]

Definition at line 143 of file netAspect.cpp.

References SPEED_TOLERANCE.

Referenced by updateServer().

bool FastEcslent::NetAspect::withinHeadingTolerance ( float  a,
float  b 
) [private]

Definition at line 147 of file netAspect.cpp.

References HEADING_TOLERANCE.

Referenced by updateServer().

void FastEcslent::NetAspect::squalchOtherClients (  )  [private]

Definition at line 185 of file netAspect.cpp.

References FastEcslent::Entity::ai, FastEcslent::UnitAspect::entity, FastEcslent::NETSLAVE, and FastEcslent::UnitAI::state.

bool FastEcslent::NetAspect::isValid ( State state  )  [private]

Definition at line 170 of file netAspect.cpp.

void FastEcslent::NetAspect::clearQueue ( std::deque< State * > *  queue,
int  size 
) [private]

Definition at line 191 of file netAspect.cpp.

Referenced by initNetworking(), and updateEcslent().

void FastEcslent::NetAspect::setEntityBeingBuilt ( Entity ent  )  [private]

Definition at line 211 of file netAspect.cpp.

References FastEcslent::Entity::builder, FastEcslent::UnitAspect::entity, FastEcslent::Builder::entityBeingBuilt, pendingEntityId, and FastEcslent::Builder::waitNetworkResponse.

Referenced by FastEcslent::NetThread::createEntFromClientRes(), and tick().

bool FastEcslent::NetAspect::checkPendingEntityId (  )  [private]

Definition at line 203 of file netAspect.cpp.

References pendingEntityId.

void FastEcslent::NetAspect::requestMineralPatchID (  )  [private]

Definition at line 52 of file netAspect.cpp.

References FastEcslent::Entity::engine, FastEcslent::UnitAspect::entity, FastEcslent::NetThread::getNetId(), FastEcslent::Engine::net, and FastEcslent::NetThread::requestMineralPatchID().

Referenced by initNetworking().

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

Reimplemented from FastEcslent::UnitAspect.

Definition at line 10 of file netAspect.cpp.

References firstTick, HEADING_TOLERANCE, pendingEntityId, and SPEED_TOLERANCE.

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

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

Reimplemented from FastEcslent::UnitAspect.

Definition at line 56 of file netAspect.cpp.

References FastEcslent::Entity::ai, FastEcslent::Entity::desiredHeading, FastEcslent::Entity::desiredSpeed, FastEcslent::Entity::engine, FastEcslent::UnitAspect::entity, firstTick, FastEcslent::NetThread::getEntityFromNetId(), initNetworking(), Options::isServer, FastEcslent::MANUAL, FastEcslent::Engine::net, FastEcslent::NETSLAVE, FastEcslent::Engine::options, pendingEntityId, setEntityBeingBuilt(), FastEcslent::UnitAI::state, updateEcslent(), and updateServer().

void FastEcslent::NetAspect::lerpPos (  ) 

Definition at line 120 of file netAspect.cpp.

References diffPos, diffPosFrac, FastEcslent::UnitAspect::entity, latency, nextPos, nextRemotePos, nSteps, FastEcslent::Entity::pos, remotePos, remoteVel, statusData, and FastEcslent::Entity::vel.

Referenced by updateEcslent().

void FastEcslent::NetAspect::lerpRot (  ) 

Definition at line 129 of file netAspect.cpp.

References destOrie, FastEcslent::UnitAspect::entity, finalDestOrie, HEADING_TOLERANCE, latency, nSteps, pitchYawRoll(), remoteQuat, rotFactor, rotProgress, srcOrie, statusData, toDegrees(), and FastEcslent::Entity::yaw.

Referenced by updateEcslent().

void FastEcslent::NetAspect::updateEcslent ( double  dt  ) 

Definition at line 74 of file netAspect.cpp.

References clearQueue(), deltaYaw, FastEcslent::Entity::desiredHeading, FastEcslent::Entity::desiredSpeed, destOrie, diffPosFrac, FastEcslent::UnitAspect::entity, FastEcslent::Entity::hitpoints, latency, lerpPos(), lerpRot(), nSteps, oldTime, FastEcslent::Entity::pos, qDelta, rotFactor, rotProgress, srcOrie, statusData, FastEcslent::Entity::timeLeftToBirth, updateQueue, and FastEcslent::Entity::yaw.

Referenced by tick().

void FastEcslent::NetAspect::createEntity ( EntityType  entType,
Ogre::Vector3  pos 
)

Definition at line 116 of file netAspect.cpp.

References FastEcslent::NetThread::createEntFromClientReq(), FastEcslent::Entity::engine, FastEcslent::UnitAspect::entity, and FastEcslent::Engine::net.

void FastEcslent::NetAspect::squalch (  ) 

Definition at line 179 of file netAspect.cpp.

References FastEcslent::Entity::ai, FastEcslent::UnitAspect::entity, FastEcslent::NETSLAVE, and FastEcslent::UnitAI::state.

void FastEcslent::NetAspect::setEntityBeingBuilt ( int  entID  ) 

Definition at line 199 of file netAspect.cpp.

References pendingEntityId.

void FastEcslent::NetAspect::initNetworking (  )  [private]

void FastEcslent::NetAspect::updateServer ( float  newDS,
float  newDH 
) [private]

bool FastEcslent::NetAspect::withinSpeedTolerance ( float  a,
float  b 
) [private]

bool FastEcslent::NetAspect::withinHeadingTolerance ( float  a,
float  b 
) [private]

void FastEcslent::NetAspect::squalchOtherClients (  )  [private]

bool FastEcslent::NetAspect::isValid ( State state  )  [private]

void FastEcslent::NetAspect::clearQueue ( std::deque< State * > *  queue,
int  size 
) [private]

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

Reimplemented from FastEcslent::UnitAspect.

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

Reimplemented from FastEcslent::UnitAspect.

void FastEcslent::NetAspect::lerpPos (  ) 

void FastEcslent::NetAspect::lerpRot (  ) 

void FastEcslent::NetAspect::updateEcslent ( double  dt  ) 

void FastEcslent::NetAspect::squalch (  ) 

void FastEcslent::NetAspect::initNetworking (  )  [private]

void FastEcslent::NetAspect::updateServer ( float  newDS,
float  newDH 
) [private]

bool FastEcslent::NetAspect::withinSpeedTolerance ( float  a,
float  b 
) [private]

bool FastEcslent::NetAspect::withinHeadingTolerance ( float  a,
float  b 
) [private]

void FastEcslent::NetAspect::squalchOtherClients (  )  [private]

bool FastEcslent::NetAspect::isValid ( State state  )  [private]

void FastEcslent::NetAspect::clearQueue ( std::deque< State * > *  queue,
int  size 
) [private]

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

Reimplemented from FastEcslent::UnitAspect.

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

Reimplemented from FastEcslent::UnitAspect.

void FastEcslent::NetAspect::lerpPos (  ) 

void FastEcslent::NetAspect::lerpRot (  ) 

void FastEcslent::NetAspect::updateEcslent ( double  dt  ) 

void FastEcslent::NetAspect::squalch (  ) 


Member Data Documentation

int FastEcslent::NetAspect::id [private]

Definition at line 20 of file netAspect.h.

Ogre::Vector3 FastEcslent::NetAspect::remoteVel [private]

Definition at line 22 of file netAspect.h.

Referenced by initNetworking(), and lerpPos().

Ogre::Vector3 FastEcslent::NetAspect::remotePos [private]

Definition at line 23 of file netAspect.h.

Referenced by initNetworking(), and lerpPos().

Ogre::Vector3 FastEcslent::NetAspect::nextRemotePos [private]

Definition at line 24 of file netAspect.h.

Referenced by lerpPos().

Ogre::Vector3 FastEcslent::NetAspect::nextPos [private]

Definition at line 25 of file netAspect.h.

Referenced by lerpPos().

Ogre::Vector3 FastEcslent::NetAspect::diffPos [private]

Definition at line 26 of file netAspect.h.

Referenced by lerpPos().

Ogre::Vector3 FastEcslent::NetAspect::diffPosFrac [private]

Definition at line 27 of file netAspect.h.

Referenced by lerpPos(), and updateEcslent().

Ogre::Quaternion FastEcslent::NetAspect::remoteQuat [private]

Definition at line 29 of file netAspect.h.

Referenced by lerpRot().

Ogre::Quaternion FastEcslent::NetAspect::destOrie [private]

Definition at line 30 of file netAspect.h.

Referenced by lerpRot(), and updateEcslent().

Ogre::Quaternion FastEcslent::NetAspect::srcOrie [private]

Definition at line 31 of file netAspect.h.

Referenced by lerpRot(), and updateEcslent().

Ogre::Quaternion FastEcslent::NetAspect::finalDestOrie [private]

Definition at line 32 of file netAspect.h.

Referenced by lerpRot().

float FastEcslent::NetAspect::rotFactor [private]

Definition at line 33 of file netAspect.h.

Referenced by initNetworking(), lerpRot(), and updateEcslent().

float FastEcslent::NetAspect::rotProgress [private]

Definition at line 34 of file netAspect.h.

Referenced by initNetworking(), lerpRot(), and updateEcslent().

int FastEcslent::NetAspect::oldTime [private]

Definition at line 36 of file netAspect.h.

Referenced by initNetworking(), and updateEcslent().

float FastEcslent::NetAspect::latency [private]

Definition at line 37 of file netAspect.h.

Referenced by initNetworking(), lerpPos(), lerpRot(), and updateEcslent().

float FastEcslent::NetAspect::nSteps [private]

Definition at line 38 of file netAspect.h.

Referenced by initNetworking(), lerpPos(), lerpRot(), and updateEcslent().

Ogre::Quaternion FastEcslent::NetAspect::qDelta [private]

Definition at line 40 of file netAspect.h.

Referenced by updateEcslent().

float FastEcslent::NetAspect::deltaYaw [private]

Definition at line 41 of file netAspect.h.

Referenced by updateEcslent().

bool FastEcslent::NetAspect::firstTick [private]

Definition at line 43 of file netAspect.h.

Referenced by init(), and tick().

State FastEcslent::NetAspect::statusData [private]

Definition at line 45 of file netAspect.h.

Referenced by initNetworking(), lerpPos(), lerpRot(), and updateEcslent().

int FastEcslent::NetAspect::pendingEntityId [private]

Definition at line 47 of file netAspect.h.

Referenced by checkPendingEntityId(), init(), setEntityBeingBuilt(), and tick().

float FastEcslent::NetAspect::ds

Definition at line 74 of file netAspect.h.

Referenced by initNetworking(), and updateServer().

float FastEcslent::NetAspect::dh

Definition at line 75 of file netAspect.h.

Referenced by initNetworking(), and updateServer().

float FastEcslent::NetAspect::SPEED_TOLERANCE

Definition at line 77 of file netAspect.h.

Referenced by init(), and withinSpeedTolerance().

float FastEcslent::NetAspect::HEADING_TOLERANCE

Definition at line 78 of file netAspect.h.

Referenced by init(), lerpRot(), and withinHeadingTolerance().

std::deque<State *> FastEcslent::NetAspect::updateQueue

Definition at line 80 of file netAspect.h.

Referenced by initNetworking(), updateEcslent(), and FastEcslent::NetThread::updateState().

std::deque<State *> FastEcslent::NetAspect::updateQueue

Definition at line 72 of file netAspect.h.

std::deque<State *> FastEcslent::NetAspect::updateQueue

Definition at line 72 of file netAspect.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