#include <TraverseInfo.h>
Public Member Functions | |
| H3D_VALUE_EXCEPTION (int, InvalidHapticsDeviceIndex) | |
| Thrown when trying to get hold of a H3DHapticsDevice using an invalid device index. | |
| TraverseInfo (const vector< H3DHapticsDevice * > &_haptics_devices) | |
| Constructor. | |
| int | getHapticsDeviceIndex (H3DHapticsDevice *hd) |
| Returns the index of the given H3DHapticsDevice. | |
| void | addHapticShape (int device_index, HapticShape *shape) |
| Adds a HapticShape to be rendered by a H3DHapticsDevice. | |
| void | addHapticShape (H3DHapticsDevice *hd, HapticShape *shape) |
| Adds a HapticShape to be rendered by a H3DHapticsDevice. | |
| void | addHapticShapeToAll (HapticShape *shape) |
| Adds a HapticShape to be rendered by all H3DHapticsDevices. | |
| const HapticShapeVector & | getHapticShapes (int device_index) |
| Get the HapticShapes that has been added for the H3DHapticsDevice with the given device_index. | |
| const HapticShapeVector & | getHapticShapes (H3DHapticsDevice *hd) |
| Get the HapticShapes that has been added for the given H3DHapticsDevice. | |
| void | addForceEffect (int device_index, HapticForceEffect *effect) |
| Adds a HapticForceEffect to be rendered by a H3DHapticsDevice. | |
| void | addForceEffect (H3DHapticsDevice *hd, HapticForceEffect *effect) |
| Adds a HapticForceEffect to be rendered by a H3DHapticsDevice. | |
| void | addForceEffectToAll (HapticForceEffect *effect) |
| Adds a HapticForceEffect to be rendered by all H3DHapticsDevices. | |
| const HapticEffectVector & | getForceEffects (int device_index) |
| Get the HapticForceEffects that has been added for the H3DHapticsDevice with the given device_index. | |
| const HapticEffectVector & | getForceEffects (H3DHapticsDevice *hd) |
| Get the HapticForceEffects that has been added for the given H3DHapticsDevice. | |
| void | setCurrentSurface (H3DSurfaceNode *s) |
| Sets the surface that is active in the current traversal. | |
| H3DSurfaceNode * | getCurrentSurface () |
| Get the surface that is active in the current traversal. | |
| H3DHapticsDevice * | getHapticsDevice (int device_index) |
| const vector< H3DHapticsDevice * > & | getHapticsDevices () |
| Get the haptics devices that are available. | |
| void | disableHaptics () |
| When called, future calls to addHapticShapes() and addForceEffects() functions will not add any shapes until enableHaptics() is called. | |
| void | enableHaptics () |
| When called, the addHapticShapes() and addForceEffects() functions calls will add HapticShapes to render. | |
| bool | hapticsEnabled () |
| Check whether haptics is enabled or not. | |
| void | pushMatrices (const Matrix4f &forward, const Matrix4f &inverse) |
| This function should be called when we move into a nested coordinate space with the transformation matrices between the coordinate spaces. | |
| void | popMatrices () |
| This function should be called when we move out from a nested coordinate space. | |
| const Matrix4f & | getAccForwardMatrix () |
| Get the accumulated forward transformation matrix, i.e. | |
| const Matrix4f & | getAccInverseMatrix () |
| Get the accumulated inverse transformation matrix, i.e. | |
Protected Attributes | |
| stack< TransformInfo > | transform_stack |
| H3DSurfaceNode * | current_surface |
| vector< H3DHapticsDevice * > | haptics_devices |
| vector< HapticShapeVector > | haptic_shapes |
| vector< HapticEffectVector > | haptic_effects |
| bool | haptics_enabled |
It contains information needed during the traversing, including e.g. transform matrices, available haptics devices etc. Geometry nodes must register the shapes to render haptically by calls to the addHapticShape() function calls.
|
|
Constructor.
|
|
||||||||||||
|
Adds a HapticForceEffect to be rendered by a H3DHapticsDevice. Shapes will only be added if hapticsEnabled() is true.
|
|
||||||||||||
|
Adds a HapticForceEffect to be rendered by a H3DHapticsDevice. Effects will only be added if hapticsEnabled() is true.
|
|
|
Adds a HapticForceEffect to be rendered by all H3DHapticsDevices. Effects will only be added if hapticsEnabled() is true.
|
|
||||||||||||
|
Adds a HapticShape to be rendered by a H3DHapticsDevice. Shapes will only be added if hapticsEnabled() is true.
|
|
||||||||||||
|
Adds a HapticShape to be rendered by a H3DHapticsDevice. Shapes will only be added if hapticsEnabled() is true.
|
|
|
Adds a HapticShape to be rendered by all H3DHapticsDevices. Shapes will only be added if hapticsEnabled() is true.
|
|
|
When called, the addHapticShapes() and addForceEffects() functions calls will add HapticShapes to render. Haptics is enabled by default. |
|
|
Get the accumulated forward transformation matrix, i.e. the transformation matrix from the local space at the current traversal position to global space. |
|
|
Get the accumulated inverse transformation matrix, i.e. the transformation matrix from global space to the local space at the current traversal position. |
|
|
Returns the index of the given H3DHapticsDevice. -1 is returned if the H3DHapticsDevice is not in the vector of haptics devices. |
|
|
Check whether haptics is enabled or not. If disabled the addHapticsShapes() functions will have no effect. Geometry nodes that add shapes should check that haptics is enabled before doing any calculations deciding what to render. This is because any HapticShape created will not be rendered anyway so no computer resources should be used creating them. |
|
||||||||||||
|
This function should be called when we move into a nested coordinate space with the transformation matrices between the coordinate spaces.
|
1.4.5