This module helps keep the client and server in sync about the positions, orientations, and velocities of relevant objects.
More...
Classes | |
struct | aesop::state_update_t |
This is a subset of an object's total state. More... | |
struct | aesop::object_state_t |
This is the full object state exposed by the Synchronizer. More... | |
class | aesop::ObjectSync |
Manages synchronization of many objects, based on (client-specified) ID. More... | |
Functions | |
void | aesop::state_update_t::clear (void) throw () |
void | aesop::state_update_t::dump (IN const char *txt) const throw () |
void | aesop::object_state_t::clear (void) throw () |
void | aesop::object_state_t::dump (IN const char *txt) const throw () |
virtual void | aesop::ObjectSync::serverUpdate (IN dword_t id, IN dword_t lastClientClock, IN const state_update_t &state)=0 |
Clients should call this whenever they get updated state from the server. | |
virtual void | aesop::ObjectSync::clientUpdate (IN dword_t clientClock)=0 |
Clients should call this on every local clock update. | |
virtual bool | aesop::ObjectSync::clientMoveRequest (IN dword_t id, IN const point3d_t &delta, IN float dt, OUT point3d_t &newPosition)=0 |
virtual bool | aesop::ObjectSync::getState (IN dword_t id, OUT object_state_t &state)=0 |
virtual bool | aesop::ObjectSync::setTypeId (IN dword_t id, IN const char *typeId)=0 |
virtual bool | aesop::ObjectSync::setMapId (IN dword_t id, IN const char *mapId)=0 |
virtual void | aesop::ObjectSync::addRequests (IN netrq::Queue *queue, IN dword_t clock)=0 |
virtual void | aesop::ObjectSync::removeObject (IN dword_t id)=0 |
Variables | |
point3d_t | aesop::state_update_t::position |
position | |
quaternion_t | aesop::state_update_t::orientation |
quaternion rotation | |
point3d_t | aesop::state_update_t::linear |
linear velocity | |
point3d_t | aesop::state_update_t::angular |
angular velocity | |
AESOPIdBuffer | aesop::object_state_t::typeId |
smart_ptr< MapDynamics > | aesop::object_state_t::dyn |
smart_ptr< PhysicsObject > | aesop::object_state_t::physicsObject |
| |
static smart_ptr< ObjectSync > | aesop::ObjectSync::create (IN smart_ptr< MapManager > mapMgr) |
virtual | aesop::ObjectSync::~ObjectSync (void) throw () |
This module helps keep the client and server in sync about the positions, orientations, and velocities of relevant objects.
void aesop::state_update_t::clear | ( | void | ) | throw () [inline, inherited] |
Reimplemented in aesop::object_state_t.
Definition at line 67 of file object-sync.h.
void aesop::state_update_t::dump | ( | IN const char * | txt | ) | const throw () [inline, inherited] |
Reimplemented in aesop::object_state_t.
Definition at line 73 of file object-sync.h.
void aesop::object_state_t::clear | ( | void | ) | throw () [inline, inherited] |
Reimplemented from aesop::state_update_t.
Definition at line 94 of file object-sync.h.
void aesop::object_state_t::dump | ( | IN const char * | txt | ) | const throw () [inline, inherited] |
Reimplemented from aesop::state_update_t.
Definition at line 100 of file object-sync.h.
virtual void aesop::ObjectSync::serverUpdate | ( | IN dword_t | id, | |
IN dword_t | lastClientClock, | |||
IN const state_update_t & | state | |||
) | [pure virtual, inherited] |
Clients should call this whenever they get updated state from the server.
lastClientClock is the last client clock that the server has acknowledged (so it will lag the actual client clock).
virtual void aesop::ObjectSync::clientUpdate | ( | IN dword_t | clientClock | ) | [pure virtual, inherited] |
Clients should call this on every local clock update.
The ObjectSync will update all object state based on known motion information.
virtual bool aesop::ObjectSync::clientMoveRequest | ( | IN dword_t | id, | |
IN const point3d_t & | delta, | |||
IN float | dt, | |||
OUT point3d_t & | newPosition | |||
) | [pure virtual, inherited] |
dt | move over what time period |
virtual bool aesop::ObjectSync::getState | ( | IN dword_t | id, | |
OUT object_state_t & | state | |||
) | [pure virtual, inherited] |
virtual bool aesop::ObjectSync::setTypeId | ( | IN dword_t | id, | |
IN const char * | typeId | |||
) | [pure virtual, inherited] |
virtual bool aesop::ObjectSync::setMapId | ( | IN dword_t | id, | |
IN const char * | mapId | |||
) | [pure virtual, inherited] |
virtual void aesop::ObjectSync::addRequests | ( | IN netrq::Queue * | queue, | |
IN dword_t | clock | |||
) | [pure virtual, inherited] |
virtual void aesop::ObjectSync::removeObject | ( | IN dword_t | id | ) | [pure virtual, inherited] |
smart_ptr< ObjectSync > aesop::ObjectSync::create | ( | IN smart_ptr< MapManager > | mapMgr | ) | [static, inherited] |
Definition at line 576 of file object-sync.cpp.
aesop::ObjectSync::~ObjectSync | ( | void | ) | throw () [virtual, inherited] |
Definition at line 50 of file object-sync.cpp.
point3d_t aesop::state_update_t::position [inherited] |
position
Definition at line 82 of file object-sync.h.
quaternion_t aesop::state_update_t::orientation [inherited] |
quaternion rotation
Definition at line 83 of file object-sync.h.
point3d_t aesop::state_update_t::linear [inherited] |
linear velocity
Definition at line 84 of file object-sync.h.
point3d_t aesop::state_update_t::angular [inherited] |
angular velocity
Definition at line 85 of file object-sync.h.
AESOPIdBuffer aesop::object_state_t::typeId [inherited] |
Definition at line 112 of file object-sync.h.
smart_ptr<MapDynamics> aesop::object_state_t::dyn [inherited] |
Definition at line 113 of file object-sync.h.
smart_ptr<PhysicsObject> aesop::object_state_t::physicsObject [inherited] |
Definition at line 114 of file object-sync.h.