H3D::SpringEffect Class Reference
[H3D specific Node classes.]

SpringEffect is a localized haptic effect where the haptics device is pulled towards to a point in space in a spring like manner, i.e. More...

#include <SpringEffect.h>

Inheritance diagram for H3D::SpringEffect:

Inheritance graph
List of all members.

Public Member Functions

 SpringEffect (Inst< SFVec3f > _position=0, Inst< SFVec3f > _force=0, Inst< SFFloat > _springConstant=0, Inst< SFFloat > _startDistance=0, Inst< SFFloat > _escapeDistance=0, Inst< SFBool > _active=0, Inst< SFInt32 > _deviceIndex=0, Inst< SFNode > _metadata=0)
 Constructor.

Public Attributes

auto_ptr< SFVec3fposition
 The position of the spring.
auto_ptr< SFVec3fforce
 The force applied by the spring to the haptics device since the last scenegraph update.
auto_ptr< SFFloatspringConstant
 The spring constant of the spring.
auto_ptr< SFFloatstartDistance
 When the haptics device comes within this distance the spring effect is activated.
auto_ptr< SFFloatescapeDistance
 If the effect is active, the effect will be deactivated if the haptics device moves outside this distance.
auto_ptr< SFBoolactive
 Active is true when the spring effect is active.
auto_ptr< SFInt32deviceIndex
 The index of the haptics device that the effect is supposed to be rendered on.
AutoRef< HapticSpringhaptic_spring
 Internal haptic spring instance.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.

Detailed Description

SpringEffect is a localized haptic effect where the haptics device is pulled towards to a point in space in a spring like manner, i.e.

the force is proportional to the the distance of the haptics device from the spring position. The effect will not start until the haptics device is within startDistance from the spring position. The effect will stop when the haptics device is further away than escapeDistance from the spring position. deviceIndex decides on which haptics device this effect should be on. The force generated will be force = (position - device_position) * springConstant


Member Data Documentation

auto_ptr< SFBool > H3D::SpringEffect::active
 

Active is true when the spring effect is active.

Access type: outputOnly
Default value: FALSE

auto_ptr< SFInt32 > H3D::SpringEffect::deviceIndex
 

The index of the haptics device that the effect is supposed to be rendered on.

Access type: inputOutput
Default value: 0

auto_ptr< SFFloat > H3D::SpringEffect::escapeDistance
 

If the effect is active, the effect will be deactivated if the haptics device moves outside this distance.

Access type: inputOutput
Default value: 0.01

auto_ptr< SFVec3f > H3D::SpringEffect::force
 

The force applied by the spring to the haptics device since the last scenegraph update.

Access type: outputOnly
Default value: Vec3f( 0, 0, 0 )

auto_ptr< SFVec3f > H3D::SpringEffect::position
 

The position of the spring.

Access type: inputOutput
Default value: Vec3f( 0, 0, 0 )

auto_ptr< SFFloat > H3D::SpringEffect::springConstant
 

The spring constant of the spring.

force = (position - device_position) * springConstant

Access type: inputOutput
Default value: 100

auto_ptr< SFFloat > H3D::SpringEffect::startDistance
 

When the haptics device comes within this distance the spring effect is activated.

Access type: inputOutput
Default value: 0.01


Generated on Thu Aug 24 12:40:04 2006 for H3D API by  doxygen 1.4.5