VHTK::VHTKHapticModeNode Class Reference
[Volume Haptics Nodes]

Inheritance diagram for VHTK::VHTKHapticModeNode:

Inheritance graph
[legend]

List of all members.


Detailed Description

The haptic mode provides primitives to the volume haptics generator (VolumeHaptics).

It is up to the subclasses of HapticMode to define haptic primitives that represents the wanted behaviour. These primitives are automatically fed into the solvers that generate a haptic feedback from any number of simultaneous instances of haptic modes. When implementing a new haptic mode, observe that the haptics is internally processed in millimeter units.

The haptic modes are put into a scenegraph that transforms the volumetric data to the desired size, position and orientation. It is the VolumeHaptics node that takes care of generating haptic feedback, so one such node must be added to the scene-graph.

Since active haptic modes are used from the haptics thread, do not delete them! Deactivate the node first and wait a few frames before deleting it.

Observe that the dynamics and animation support can be removed at compile-time and may not be available in all builds of the toolkit.

X3D Interface

 NameTypeDefault valueDescription
active SFBool   true   Specifies if this haptic mode should be active or not.  
activeDynamics SFBool   false   If true the volume haptics algorithms take into account the changes in transforms and animation when calculating the force feedback. This makes the haptic modes actively follow the transformations, but might lead to instability due to the energy added to the control system. This feature must also be activated in the volume haptics node.  
animationMotionVector MFVectorDataNode   null   This field describes the motion within the data used with the haptic mode. 
animationMotionScale SFFloat   1.0   This field describes how far, along the animation motion vector and relative its length, a hypothetical particle moves during one animation frame.  
animationFrame SFFloat   0   This field animates the haptic mode with sub frame precision. Connect a TimeSensor or ScalarInterpolator to this field.  

Public Types

typedef H3D::DependentMFNode
< VHTKVectorDataNode,
H3D::FieldRef< VHTKDataNode,
H3D::Field,&VHTKVectorDataNode::dataChanged > > 
MFVectorDataNode

Public Member Functions

 VHTKHapticModeNode (H3D::Inst< H3D::SFNode > _metadata=0, H3D::Inst< H3D::SFBool > _activeDynamics=0, H3D::Inst< MFVectorDataNode > _animationMotionVector=0, H3D::Inst< H3D::SFFloat > _animationMotionScale=0, H3D::Inst< H3D::SFFloat > _animationFrame=0, H3D::Inst< H3D::SFBool > _temporalInterpolation=0, H3D::Inst< H3D::SFBool > _active=0)
virtual void getPrimitives (primitives_t &plist, const state &s)=0
 This function is called by the system at haptic rate to collect the haptic primitives that should contribute to the feedback of each time-frame.
void traverseSG (H3D::TraverseInfo &ti)

Public Attributes

auto_ptr< H3D::SFBoolactive
 Specifies if this haptic mode should be active or not.
auto_ptr< H3D::SFBoolactiveDynamics
 If true the volume haptics algorithms take into account the changes in transforms and animation when calculating the force feedback.
auto_ptr< MFVectorDataNodeanimationMotionVector
 This field describes the motion within the data used with the haptic mode.
auto_ptr< H3D::SFFloatanimationMotionScale
 This field describes how far, along the animation motion vector and relative its length, a hypothetical particle moves during one animation frame.
auto_ptr< H3D::SFFloatanimationFrame
 This field animates the haptic mode with sub frame precision.
auto_ptr< H3D::SFBooltemporalInterpolation
 If true, this haptic mode makes use of temporal interpolation.

Static Public Attributes

static H3D::H3DNodeDatabase database

Friends

struct VolumeHapticsEffect


Member Function Documentation

virtual void VHTK::VHTKHapticModeNode::getPrimitives ( primitives_t plist,
const state s 
) [pure virtual]

This function is called by the system at haptic rate to collect the haptic primitives that should contribute to the feedback of each time-frame.

Extend this to produce your own haptic modes. Information about the current proxy position, probe position and stiffness is provided in the state variable.

Implemented in VHTK::ScalarSurfaceFrictionMode, VHTK::ScalarIsoSurfaceMode, VHTK::ScalarViscosityMode, VHTK::ScalarGradientForceMode, VHTK::ScalarGradientPenetrationForceMode, VHTK::VectorForceMode, VHTK::VectorFrontShapeMode, VHTK::VectorFollowMode, VHTK::VectorVortexMode, VHTK::VectorVortexForceMode, VHTK::PrimitivesMode, and VHTK::PSProgrammableScalarMode.


Member Data Documentation

Specifies if this haptic mode should be active or not.

If true the volume haptics algorithms take into account the changes in transforms and animation when calculating the force feedback.

This makes the haptic modes actively follow the transformations, but might lead to instability due to the energy added to the control system.

This feature must also be activated in the volume haptics node.

This field describes the motion within the data used with the haptic mode.

This field describes how far, along the animation motion vector and relative its length, a hypothetical particle moves during one animation frame.

This field animates the haptic mode with sub frame precision.

Connect a TimeSensor or ScalarInterpolator to this field.

If true, this haptic mode makes use of temporal interpolation.

This requires some extra calculations and makes a difference only in interaction with time-varying data in which features not only moves but also diminishes or increases over time.


Generated on Thu Mar 5 08:46:57 2009 for Volume Haptics Toolkit by  doxygen 1.5.6