PhysicsInputSynchronisationModel Class Reference
#include <PhysicsInputSynchronisationModel.h>
Inherits SynchronisationModel, and oops::SimulationObjectInputListener.

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 | |
| MessageSizeCounter * | counter |
| 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] |
Reimplemented from oops::SimulationObjectInputListener.
| 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.
std::vector<SyncData*> PhysicsInputSynchronisationModel::immediateUpdates [protected] |
float PhysicsInputSynchronisationModel::inputUpdateInterval [protected] |
Number of seconds between two updates when input occured.
unsigned PhysicsInputSynchronisationModel::lastUpdateTime [protected] |
std::vector<oops::RigidBody*> PhysicsInputSynchronisationModel::modifiedRigidBodies [protected] |
list of all rigidBodies which have been modified in the last simulation step
const unsigned PhysicsInputSynchronisationModel::PHYSICSINPUTSYNCHRONISATION_MESSAGEID = 6 [static, protected] |
float PhysicsInputSynchronisationModel::simulationStepSize [protected] |
time between two simulation steps
std::map<unsigned, SyncData*> PhysicsInputSynchronisationModel::storedUpdates [protected] |
float PhysicsInputSynchronisationModel::timeUntilFrequentUpdate [protected] |
timer until next frequent synchronisation message for changed RBs has to be sent
float PhysicsInputSynchronisationModel::timeUntilNextUpdate [protected] |
timer until next synchronisation messages has to be sent
float PhysicsInputSynchronisationModel::updateInterval [protected] |
Number of seconds between two updates.
The documentation for this class was generated from the following files:
- src/inVRs/Modules/3DPhysics/PhysicsInputSynchronisationModel.h
- src/inVRs/Modules/3DPhysics/PhysicsInputSynchronisationModel.cpp
Generated on Wed Oct 20 16:11:59 2010 for inVRs by
1.5.8