Classes | Functions | Variables

Object Synchronization
[AESOP Client Library]


This module helps keep the client and server in sync about the positions, orientations, and velocities of relevant objects. More...

Collaboration diagram for Object Synchronization:

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 (const char *txt) const throw ()
void aesop::object_state_t::clear (void) throw ()
void aesop::object_state_t::dump (const char *txt) const throw ()
virtual void aesop::ObjectSync::serverUpdate (dword_t id, dword_t lastClientClock, const state_update_t &state)=0
 Clients should call this whenever they get updated state from the server.
virtual void aesop::ObjectSync::clientUpdate (dword_t clientClock)=0
 Clients should call this on every local clock update.
virtual bool aesop::ObjectSync::clientMoveRequest (dword_t id, const point3d_t &delta, float dt, point3d_t &newPosition)=0
virtual bool aesop::ObjectSync::getState (dword_t id, object_state_t &state)=0
virtual bool aesop::ObjectSync::setTypeId (dword_t id, const char *typeId)=0
virtual bool aesop::ObjectSync::setMapId (dword_t id, const char *mapId)=0
virtual void aesop::ObjectSync::addRequests (netrq::Queue *queue, dword_t clock)=0
virtual void aesop::ObjectSync::removeObject (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 (smart_ptr< MapManager > mapMgr)
virtual aesop::ObjectSync::~ObjectSync (void) throw ()

Detailed Description


This module helps keep the client and server in sync about the positions, orientations, and velocities of relevant objects.


Function Documentation

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 ( 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 ( 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 ( dword_t  id,
dword_t  lastClientClock,
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 ( 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 ( dword_t  id,
const point3d_t delta,
float  dt,
point3d_t newPosition 
) [pure virtual, inherited]
Parameters:
dt move over what time period
virtual bool aesop::ObjectSync::getState ( dword_t  id,
object_state_t state 
) [pure virtual, inherited]
virtual bool aesop::ObjectSync::setTypeId ( dword_t  id,
const char *  typeId 
) [pure virtual, inherited]
virtual bool aesop::ObjectSync::setMapId ( dword_t  id,
const char *  mapId 
) [pure virtual, inherited]
virtual void aesop::ObjectSync::addRequests ( netrq::Queue queue,
dword_t  clock 
) [pure virtual, inherited]
virtual void aesop::ObjectSync::removeObject ( dword_t  id  )  [pure virtual, inherited]
smart_ptr< ObjectSync > aesop::ObjectSync::create ( 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.


Variable Documentation

position

Definition at line 82 of file object-sync.h.

quaternion rotation

Definition at line 83 of file object-sync.h.

linear velocity

Definition at line 84 of file object-sync.h.

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.