PhysicsFullSynchronisationModel Class Reference

#include <PhysicsFullSynchronisationModel.h>

Inherits SynchronisationModel.

Collaboration diagram for PhysicsFullSynchronisationModel:

List of all members.


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

MessageSizeCountercounter
 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

Enumerator:
SNAPPING 
LINEAR 
QUADRIC 


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

Counter for logging the amount of bytes transmitted for synchronisation.

Counter until next synchronisation messages has to be sent.

Number of simulation steps 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