SynchronisationModel Class Reference
#include <SynchronisationModel.h>
Inherited by ChangedSynchronisationModel, FullSynchronisationModel, PhysicsFullSynchronisationModel, PhysicsInputSynchronisationModel, and VelocitySynchronisationModel.

Detailed Description
Class capable of synchronising server data with other servers or clients This class is used to synchronise data from a server to the connected clients and to other servers. The class therefore will be called from the Physics Module before a simulation step takes place and after a simulation step occured. The class can then decide whether to send data to other users or not.Constructor & Destructor Documentation
| SynchronisationModel::SynchronisationModel | ( | ) |
Constructor zeroes objectManager-pointer.
| SynchronisationModel::~SynchronisationModel | ( | ) | [virtual] |
Empty destructor.
Member Function Documentation
| Joint * SynchronisationModel::getJointById | ( | PhysicsObjectManager * | manager, | |
| OopsObjectID | id | |||
| ) | [protected] |
Helper-method to access the method in the PhysicsObjectManager
| void SynchronisationModel::getLocalSimulatedJoints | ( | PhysicsObjectManager * | manager, | |
| std::vector< oops::Joint * > & | dst | |||
| ) | [protected] |
Helper-method to access the method in the PhysicsObjectManager
| void SynchronisationModel::getLocalSimulatedRigidBodies | ( | PhysicsObjectManager * | manager, | |
| std::vector< oops::RigidBody * > & | dst | |||
| ) | [protected] |
Helper-method to access the method in the PhysicsObjectManager
| void SynchronisationModel::getRemoteSimulatedJoints | ( | PhysicsObjectManager * | manager, | |
| std::vector< oops::Joint * > & | dst | |||
| ) | [protected] |
Helper-method to access the method in the PhysicsObjectManager
| void SynchronisationModel::getRemoteSimulatedRigidBodies | ( | PhysicsObjectManager * | manager, | |
| std::vector< oops::RigidBody * > & | dst | |||
| ) | [protected] |
Helper-method to access the method in the PhysicsObjectManager
| RigidBody * SynchronisationModel::getRigidBodyById | ( | PhysicsObjectManager * | manager, | |
| OopsObjectID | id | |||
| ) | [protected] |
Helper-method to access the method in the PhysicsObjectManager
| virtual void SynchronisationModel::handleClientInputMessage | ( | NetMessage * | msg | ) | [protected, pure virtual] |
Handles the client input messages
Implemented in AccelerationSynchronisationModel, ChangedSynchronisationModel, FullSynchronisationModel, PhysicsFullSynchronisationModel, PhysicsInputSynchronisationModel, and VelocitySynchronisationModel.
| void SynchronisationModel::handleMessages | ( | ) | [protected, virtual] |
Handles the incoming network messages. The method is called before each simulation step. It should receive all incoming messages from the Network Module and execute them.
| virtual void SynchronisationModel::handleSyncMessage | ( | NetMessage * | msg | ) | [protected, pure virtual] |
Handles the synchronisation message
Implemented in AccelerationSynchronisationModel, ChangedSynchronisationModel, FullSynchronisationModel, PhysicsFullSynchronisationModel, PhysicsInputSynchronisationModel, and VelocitySynchronisationModel.
| bool SynchronisationModel::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 in PhysicsFullSynchronisationModel, and PhysicsInputSynchronisationModel.
| void SynchronisationModel::setPhysicsObjectManager | ( | PhysicsObjectManager * | objectManager | ) | [protected, virtual] |
Stores a pointer to the PhysicsObjectManager. The method is called in the Physics::loadConfig method and stores a local pointer to the used PhysicsObjectManager.
- Parameters:
-
objectManager PhysicsObjectManager from the Physics Module.
| void SynchronisationModel::setSimulationTime | ( | unsigned | simulationTime | ) | [protected] |
Helper-method to set the simulationTime of the Physics module
| virtual void SynchronisationModel::synchroniseAfterStep | ( | ) | [protected, pure virtual] |
Synchronises data after a simulation step. The method is called from the Physics Module after a simulation step takes place.
Implemented in ChangedSynchronisationModel, FullSynchronisationModel, PhysicsFullSynchronisationModel, PhysicsInputSynchronisationModel, and VelocitySynchronisationModel.
| virtual void SynchronisationModel::synchroniseBeforeStep | ( | ) | [protected, pure virtual] |
Synchronises data before a simulation step. The method is called from the Physics Module before a simulation step takes place.
Implemented in AccelerationSynchronisationModel, ChangedSynchronisationModel, FullSynchronisationModel, PhysicsFullSynchronisationModel, PhysicsInputSynchronisationModel, and VelocitySynchronisationModel.
Friends And Related Function Documentation
friend class Physics [friend] |
Member Data Documentation
std::vector<NetMessage*> SynchronisationModel::messageList [protected] |
List of incoming messages.
NetworkInterface* SynchronisationModel::network [protected] |
Pointer to the Network module.
PhysicsObjectManager* SynchronisationModel::objectManager [protected] |
Pointer to the used PhysicsObjectManager.
Physics* SynchronisationModel::physics [protected] |
Pointer to Physics.
The documentation for this class was generated from the following files:
- src/inVRs/Modules/3DPhysics/SynchronisationModel.h
- src/inVRs/Modules/3DPhysics/SynchronisationModel.cpp
Generated on Wed Oct 20 16:12:01 2010 for inVRs by
1.5.8