version 3.3

VRS::PhysicalSpringForce Class Reference

#include <vrs/sg/physicalforce.h>

Inheritance diagram for VRS::PhysicalSpringForce:

VRS::PhysicalForce VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 PhysicalSpringForce (float physical_springforce=1.0)
virtual ~PhysicalSpringForce ()
 Destructor.
Vector calcForceDifferential (const Vector &cameraPos, const Vector &targetPos, const Vector &d_cameraPos, const Vector &d_targetPos)
float getSpringForce ()
 VRS_TYPEINFO (PhysicalSpringForce, PhysicalForce)
 VRS_SERIALIZABLE (PhysicalSpringForce)


Constructor & Destructor Documentation

VRS::PhysicalSpringForce::PhysicalSpringForce ( float  physical_springforce = 1.0  ) 

< PhysicalSpringForce is a PhysicalForce which implements the operating force as a spring force. This implementation is done in the method calcForceDifferential(). For detailled information see note in PhysicalForce.

virtual VRS::PhysicalSpringForce::~PhysicalSpringForce (  )  [virtual]

Destructor.


Member Function Documentation

Vector VRS::PhysicalSpringForce::calcForceDifferential ( const Vector cameraPos,
const Vector targetPos,
const Vector d_cameraPos,
const Vector d_targetPos 
) [virtual]

The PhysicalSpringNavigation metaphor uses a spring force to implement the force.

The spring force has the following mathematical form: F(springForce) = S * (targetPos - cameraPos) S is a proportionality constant describing the strength of the force. In PhysicalSpringNavigation S is defined by the member variable physical_springforce_.

To calculate the differential one has to build the time derivation: dF/dt = S * ( d(targetPos)/dt - d(cameraPos)/dt )

The differential dF is therefore: dF = S * ( d(targetPos) - d(cameraPos) )

Reimplemented from VRS::PhysicalForce.

float VRS::PhysicalSpringForce::getSpringForce (  )  [inline]

VRS::PhysicalSpringForce::VRS_TYPEINFO ( PhysicalSpringForce  ,
PhysicalForce   
)

VRS::PhysicalSpringForce::VRS_SERIALIZABLE ( PhysicalSpringForce   ) 


The documentation for this class was generated from the following file:

Generated on Tue May 22 06:00:29 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact