VelocitySynchronisationModel Class Reference
#include <VelocitySynchronisationModel.h>
Inherits SynchronisationModel.
Inherited by AccelerationSynchronisationModel.

Classes | |
| struct | LinearConvergenceState |
| struct | RigidBodyState |
| struct | SyncData |
| struct | SyncState |
Public Member Functions | |
| VelocitySynchronisationModel (float linearThreshold, float angularThreshold, int convergenceAlgorithm=0, float convergenceTime=0) | |
| virtual | ~VelocitySynchronisationModel () |
| virtual void | synchroniseBeforeStep () |
| virtual void | synchroniseAfterStep () |
Protected Types | |
| enum | CONVERGENCE_ALGORITHM { SNAPPING = 0, LINEAR = 1, QUADRIC = 2 } |
Protected Member Functions | |
| void | handleDeactivatedRigidBody (oops::RigidBody *rigidBody, unsigned simulationTime, NetMessage *msg) |
| virtual bool | isPredictionStillValid (oops::RigidBody *rigidBody, unsigned simulationTime) |
| virtual bool | calculatePrediction (gmtl::Vec3f &newPos, gmtl::Quatf &newOri, oops::RigidBody *rigidBody, unsigned simulationTime) |
| virtual bool | calculatePredictionFromState (gmtl::Vec3f &newPos, gmtl::Quatf &newOri, RigidBodyState *rigidBodyState, unsigned simulationTime) |
| virtual bool | calculatePredictionLinear (gmtl::Vec3f &newPos, gmtl::Quatf &newOri, oops::RigidBody *rigidBody, unsigned simulationTime) |
| virtual void | initiateLinearConvergence (oops::RigidBody *rigidBody, RigidBodyState *oldState, RigidBodyState *newState, unsigned simulationTime) |
| virtual void | updatePredictionState (oops::RigidBody *rigidBody, unsigned simulationTime, bool isInactive=false) |
| virtual void | encodePredictionState (oops::RigidBody *rigidBody, NetMessage *msg) |
| virtual void | handleBufferedSyncMessages () |
| virtual void | applySyncData (SyncData *nextSyncData, unsigned localSimulationTime) |
| virtual void | handleSyncMessage (NetMessage *msg) |
| virtual void | handleClientInputMessage (NetMessage *msg) |
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 |
| std::map< uint64_t, int > | inactiveRepeatSend |
| std::map< uint64_t, RigidBodyState * > | lastStateMap |
| std::map< uint64_t, LinearConvergenceState * > | linearConvMap |
| float | simulationStepSize |
| float | linearThreshold |
| float | angularThreshold |
| float | convergenceTime |
| int | convergenceAlgorithm |
| unsigned | usedSyncModel |
Static Protected Attributes | |
| static const unsigned | VELOCITYSYNCHRONISATION_MESSAGEID = 3 |
Detailed Description
SynchronisationModel which synchronises every step only changed data. After each simulation step the transformations of the rigid bodies which have changed are distributed.Member Enumeration Documentation
enum VelocitySynchronisationModel::CONVERGENCE_ALGORITHM [protected] |
Constructor & Destructor Documentation
| VelocitySynchronisationModel::VelocitySynchronisationModel | ( | float | linearThreshold, | |
| float | angularThreshold, | |||
| int | convergenceAlgorithm = 0, |
|||
| float | convergenceTime = 0 | |||
| ) |
Constructor initializes network-pointer.
| VelocitySynchronisationModel::~VelocitySynchronisationModel | ( | ) | [virtual] |
Empty destructor.
Member Function Documentation
| void VelocitySynchronisationModel::applySyncData | ( | SyncData * | nextSyncData, | |
| unsigned | localSimulationTime | |||
| ) | [protected, virtual] |
| bool VelocitySynchronisationModel::calculatePrediction | ( | gmtl::Vec3f & | newPos, | |
| gmtl::Quatf & | newOri, | |||
| oops::RigidBody * | rigidBody, | |||
| unsigned | simulationTime | |||
| ) | [protected, virtual] |
Reimplemented in AccelerationSynchronisationModel.
| bool VelocitySynchronisationModel::calculatePredictionFromState | ( | gmtl::Vec3f & | newPos, | |
| gmtl::Quatf & | newOri, | |||
| RigidBodyState * | rigidBodyState, | |||
| unsigned | simulationTime | |||
| ) | [protected, virtual] |
| bool VelocitySynchronisationModel::calculatePredictionLinear | ( | gmtl::Vec3f & | newPos, | |
| gmtl::Quatf & | newOri, | |||
| oops::RigidBody * | rigidBody, | |||
| unsigned | simulationTime | |||
| ) | [protected, virtual] |
| void VelocitySynchronisationModel::encodePredictionState | ( | oops::RigidBody * | rigidBody, | |
| NetMessage * | msg | |||
| ) | [protected, virtual] |
Reimplemented in AccelerationSynchronisationModel.
| void VelocitySynchronisationModel::handleBufferedSyncMessages | ( | ) | [protected, virtual] |
| void VelocitySynchronisationModel::handleClientInputMessage | ( | NetMessage * | msg | ) | [protected, virtual] |
Handles the client input messages
Implements SynchronisationModel.
Reimplemented in AccelerationSynchronisationModel.
| void VelocitySynchronisationModel::handleDeactivatedRigidBody | ( | oops::RigidBody * | rigidBody, | |
| unsigned | simulationTime, | |||
| NetMessage * | msg | |||
| ) | [protected] |
Sends last rigid body states of deactivated objects multiple times to ensure the clients receive the correct values.
| void VelocitySynchronisationModel::handleSyncMessage | ( | NetMessage * | msg | ) | [protected, virtual] |
Handles the synchronisation message
Implements SynchronisationModel.
Reimplemented in AccelerationSynchronisationModel.
| void VelocitySynchronisationModel::initiateLinearConvergence | ( | oops::RigidBody * | rigidBody, | |
| RigidBodyState * | oldState, | |||
| RigidBodyState * | newState, | |||
| unsigned | simulationTime | |||
| ) | [protected, virtual] |
| bool VelocitySynchronisationModel::isPredictionStillValid | ( | oops::RigidBody * | rigidBody, | |
| unsigned | simulationTime | |||
| ) | [protected, virtual] |
Calculates the predicted transformation for the passed rigid body and returns if the prediction is still valid or if an update message has to be transmitted.
| void VelocitySynchronisationModel::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 VelocitySynchronisationModel::synchroniseBeforeStep | ( | ) | [virtual] |
Synchronises data before a simulation step. The method is called from the Physics Module before a simulation step takes place.
Implements SynchronisationModel.
Reimplemented in AccelerationSynchronisationModel.
| void VelocitySynchronisationModel::updatePredictionState | ( | oops::RigidBody * | rigidBody, | |
| unsigned | simulationTime, | |||
| bool | isInactive = false | |||
| ) | [protected, virtual] |
Reimplemented in AccelerationSynchronisationModel.
Member Data Documentation
float VelocitySynchronisationModel::angularThreshold [protected] |
int VelocitySynchronisationModel::convergenceAlgorithm [protected] |
float VelocitySynchronisationModel::convergenceTime [protected] |
MessageSizeCounter* VelocitySynchronisationModel::counter [protected] |
Counter for logging the amount of bytes transmitted for synchronisation.
std::vector<SyncData*> VelocitySynchronisationModel::immediateUpdates [protected] |
std::map<uint64_t, int> VelocitySynchronisationModel::inactiveRepeatSend [protected] |
std::map<uint64_t, RigidBodyState*> VelocitySynchronisationModel::lastStateMap [protected] |
unsigned VelocitySynchronisationModel::lastUpdateTime [protected] |
std::map<uint64_t, LinearConvergenceState*> VelocitySynchronisationModel::linearConvMap [protected] |
float VelocitySynchronisationModel::linearThreshold [protected] |
float VelocitySynchronisationModel::simulationStepSize [protected] |
std::map<unsigned, SyncData*> VelocitySynchronisationModel::storedUpdates [protected] |
unsigned VelocitySynchronisationModel::usedSyncModel [protected] |
const unsigned VelocitySynchronisationModel::VELOCITYSYNCHRONISATION_MESSAGEID = 3 [static, protected] |
The documentation for this class was generated from the following files:
- src/inVRs/Modules/3DPhysics/VelocitySynchronisationModel.h
- src/inVRs/Modules/3DPhysics/VelocitySynchronisationModel.cpp
Generated on Wed Oct 20 16:12:02 2010 for inVRs by
1.5.8