| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/physicalforce.h>

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) | |
| 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.
| 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 | ) |