PhysicsInputSynchronisationModel Class Reference

#include <PhysicsInputSynchronisationModel.h>

Inherits SynchronisationModel, and oops::SimulationObjectInputListener.

Collaboration diagram for PhysicsInputSynchronisationModel:

List of all members.


Classes

struct  RigidBodyState
struct  SyncData

Public Member Functions

 PhysicsInputSynchronisationModel (float updateInterval=1, float inputUpdateInterval=0)
virtual ~PhysicsInputSynchronisationModel ()
virtual void synchroniseBeforeStep ()
virtual void synchroniseAfterStep ()

Protected Member Functions

virtual void handleBufferedSyncMessages ()
virtual void applySyncData (SyncData *nextSyncData, unsigned localSimulationTime)
virtual void handleSyncMessage (NetMessage *msg)
virtual void handleClientInputMessage (NetMessage *msg)
virtual bool needPhysicsCalculation ()
virtual void handleRigidBodyInput (oops::RigidBody *rigidBody, oops::RIGIDBODY_METHODTYPE method, oops::MethodParameter *parameter)

Protected Attributes

MessageSizeCountercounter
 Counter for logging the amount of bytes transmitted for synchronisation.
std::vector< SyncData * > immediateUpdates
std::map< unsigned, SyncData * > storedUpdates
unsigned lastUpdateTime
float timeUntilNextUpdate
 timer until next synchronisation messages has to be sent
float timeUntilFrequentUpdate
 timer until next frequent synchronisation message for changed RBs has to be sent
float updateInterval
 Number of seconds between two updates.
float inputUpdateInterval
 Number of seconds between two updates when input occured.
float simulationStepSize
 time between two simulation steps
std::vector< oops::RigidBody * > modifiedRigidBodies
 list of all rigidBodies which have been modified in the last simulation step

Static Protected Attributes

static const unsigned PHYSICSINPUTSYNCHRONISATION_MESSAGEID = 6

Detailed Description

SynchronisationModel which does client-side physics calculations.

Constructor & Destructor Documentation

PhysicsInputSynchronisationModel::PhysicsInputSynchronisationModel ( float  updateInterval = 1,
float  inputUpdateInterval = 0 
)

Constructor initializes MessageCounter

PhysicsInputSynchronisationModel::~PhysicsInputSynchronisationModel (  )  [virtual]

Empty destructor.


Member Function Documentation

void PhysicsInputSynchronisationModel::applySyncData ( SyncData nextSyncData,
unsigned  localSimulationTime 
) [protected, virtual]

void PhysicsInputSynchronisationModel::handleBufferedSyncMessages (  )  [protected, virtual]

void PhysicsInputSynchronisationModel::handleClientInputMessage ( NetMessage msg  )  [protected, virtual]

Handles the client input messages

Implements SynchronisationModel.

void PhysicsInputSynchronisationModel::handleRigidBodyInput ( oops::RigidBody rigidBody,
oops::RIGIDBODY_METHODTYPE  method,
oops::MethodParameter parameter 
) [protected, virtual]

void PhysicsInputSynchronisationModel::handleSyncMessage ( NetMessage msg  )  [protected, virtual]

Handles the synchronisation message

Implements SynchronisationModel.

bool PhysicsInputSynchronisationModel::needPhysicsCalculation (  )  [protected, virtual]

DEPRECATED: Helper method for derived SynchronisationModels to access protected methods from PhysicsObjects. DEPRECATED: Helper method for derived SynchronisationModels to access protected methods from PhysicsObjects. DEPRECATED: Helper method for derived SynchronisationModels to access protected methods from PhysicsObjects. DEPRECATED: Helper method for derived SynchronisationModels to access protected methods from PhysicsObjects. DEPRECATED: Helper method for derived SynchronisationModels to access protected methods from PhysicsObjects. DEPRECATED: Helper method for derived SynchronisationModels to access protected methods from PhysicsObjects. Helper method for derived SynchronisationModels to access protected methods from PhysicsObjects. Helper method for derived SynchronisationModels to access protected methods from PhysicsObjects. Stores all connected users in the passes vector. The method copies the vector of connected users from the Physics module to the passed vector.

Parameters:
dst vector where the connected userIds should be stored in Returns the UserData of the user with the passed Id.
userId Id of the user
Returns:
UserData of the user with the passed Id Returns if the current SynchronisationModel needs physics calculations or not.

true if the Physics-engine should do calculations

Reimplemented from SynchronisationModel.

void PhysicsInputSynchronisationModel::synchroniseAfterStep (  )  [virtual]

Synchronises data after a simulation step. The method is called from the Physics Module after a simulation step takes place.

Implements SynchronisationModel.

void PhysicsInputSynchronisationModel::synchroniseBeforeStep (  )  [virtual]

Synchronises data before a simulation step. The method is called from the Physics Module before a simulation step takes place.

Implements SynchronisationModel.


Member Data Documentation

Counter for logging the amount of bytes transmitted for synchronisation.

Number of seconds between two updates when input occured.

list of all rigidBodies which have been modified in the last simulation step

time between two simulation steps

timer until next frequent synchronisation message for changed RBs has to be sent

timer until next synchronisation messages has to be sent

Number of seconds between two updates.


The documentation for this class was generated from the following files:

Generated on Wed Oct 20 16:11:59 2010 for inVRs by doxygen 1.5.8