PhysicsFullSynchronisationModel Class Reference
#include <PhysicsFullSynchronisationModel.h>
Inherits SynchronisationModel.

Classes | |
| struct | RigidBodyState |
Public Member Functions | |
| PhysicsFullSynchronisationModel (unsigned updateInterval=1, int convergenceAlgorithm=0, float convergenceTime=0) | |
| virtual | ~PhysicsFullSynchronisationModel () |
| virtual void | synchroniseBeforeStep () |
| virtual void | synchroniseAfterStep () |
Protected Types | |
| enum | CONVERGENCE_ALGORITHM { SNAPPING = 0, LINEAR = 1, QUADRIC = 2 } |
Protected Member Functions | |
| virtual void | handleServerSynchronisation () |
| virtual void | handleClientSynchronisation () |
| virtual bool | calculateLinearConvergence (gmtl::Vec3f &newPos, gmtl::Quatf &newOri, oops::RigidBody *rigidBody, unsigned simulationTime) |
| virtual bool | calculateQuadricConvergence (gmtl::Vec3f &newPos, gmtl::Quatf &newOri, oops::RigidBody *rigidBody, unsigned simulationTime) |
| virtual void | calculateFutureTransformation (TransformationData &result, TransformationData trans, gmtl::Vec3f linearVel, gmtl::Vec3f angularVel, float dt) |
| virtual void | handleSyncMessage (NetMessage *msg) |
| virtual void | handleClientInputMessage (NetMessage *msg) |
| virtual bool | needPhysicsCalculation () |
Protected Attributes | |
| MessageSizeCounter * | counter |
| Counter for logging the amount of bytes transmitted for synchronisation. | |
| unsigned | stepsUntilUpdate |
| Counter until next synchronisation messages has to be sent. | |
| unsigned | updateInterval |
| Number of simulation steps between two updates. | |
| float | simulationStepSize |
| int | convergenceAlgorithm |
| float | convergenceTime |
| std::map< uint64_t, RigidBodyState * > | convergenceState |
Static Protected Attributes | |
| static const unsigned | PHYSICSFULLSYNCHRONISATION_MESSAGEID = 5 |
Detailed Description
SynchronisationModel which does client-side physics calculations.Member Enumeration Documentation
enum PhysicsFullSynchronisationModel::CONVERGENCE_ALGORITHM [protected] |
Constructor & Destructor Documentation
| PhysicsFullSynchronisationModel::PhysicsFullSynchronisationModel | ( | unsigned | updateInterval = 1, |
|
| int | convergenceAlgorithm = 0, |
|||
| float | convergenceTime = 0 | |||
| ) |
Constructor initializes MessageCounter
| PhysicsFullSynchronisationModel::~PhysicsFullSynchronisationModel | ( | ) | [virtual] |
Empty destructor.
Member Function Documentation
| void PhysicsFullSynchronisationModel::calculateFutureTransformation | ( | TransformationData & | result, | |
| TransformationData | trans, | |||
| gmtl::Vec3f | linearVel, | |||
| gmtl::Vec3f | angularVel, | |||
| float | dt | |||
| ) | [protected, virtual] |
| bool PhysicsFullSynchronisationModel::calculateLinearConvergence | ( | gmtl::Vec3f & | newPos, | |
| gmtl::Quatf & | newOri, | |||
| oops::RigidBody * | rigidBody, | |||
| unsigned | simulationTime | |||
| ) | [protected, virtual] |
| bool PhysicsFullSynchronisationModel::calculateQuadricConvergence | ( | gmtl::Vec3f & | newPos, | |
| gmtl::Quatf & | newOri, | |||
| oops::RigidBody * | rigidBody, | |||
| unsigned | simulationTime | |||
| ) | [protected, virtual] |
| void PhysicsFullSynchronisationModel::handleClientInputMessage | ( | NetMessage * | msg | ) | [protected, virtual] |
Handles the client input messages
Implements SynchronisationModel.
| void PhysicsFullSynchronisationModel::handleClientSynchronisation | ( | ) | [protected, virtual] |
| void PhysicsFullSynchronisationModel::handleServerSynchronisation | ( | ) | [protected, virtual] |
| void PhysicsFullSynchronisationModel::handleSyncMessage | ( | NetMessage * | msg | ) | [protected, virtual] |
Handles the synchronisation message
Implements SynchronisationModel.
| bool PhysicsFullSynchronisationModel::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 PhysicsFullSynchronisationModel::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 PhysicsFullSynchronisationModel::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
int PhysicsFullSynchronisationModel::convergenceAlgorithm [protected] |
std::map<uint64_t, RigidBodyState*> PhysicsFullSynchronisationModel::convergenceState [protected] |
float PhysicsFullSynchronisationModel::convergenceTime [protected] |
Counter for logging the amount of bytes transmitted for synchronisation.
const unsigned PhysicsFullSynchronisationModel::PHYSICSFULLSYNCHRONISATION_MESSAGEID = 5 [static, protected] |
float PhysicsFullSynchronisationModel::simulationStepSize [protected] |
unsigned PhysicsFullSynchronisationModel::stepsUntilUpdate [protected] |
Counter until next synchronisation messages has to be sent.
unsigned PhysicsFullSynchronisationModel::updateInterval [protected] |
Number of simulation steps between two updates.
The documentation for this class was generated from the following files:
- src/inVRs/Modules/3DPhysics/PhysicsFullSynchronisationModel.h
- src/inVRs/Modules/3DPhysics/PhysicsFullSynchronisationModel.cpp
Generated on Wed Oct 20 16:11:59 2010 for inVRs by
1.5.8