Candy
|
A mouse driven haptic device. More...
Classes | |
struct | Depth |
class | Device |
Public Member Functions | |
virtual void | preRender () |
virtual void | renderStylus () |
Public Attributes | |
std::auto_ptr< Depth > | depth |
![]() | |
std::auto_ptr< H3D::SFBool > | useZBuffer |
![]() | |
std::auto_ptr< H3D::SFFloat > | zScale |
![]() | |
std::auto_ptr< H3D::SFRotation > | orientation |
![]() | |
Static Public Attributes | |
static H3D::H3DNodeDatabase | database |
Protected Attributes | |
struct CANDY_API | Depth |
Device * | device |
H3D::AutoRef< H3D::MouseSensor > | mouse |
A mouse driven haptic device.
This device will follow the mouse pointer projected into the 3D world. The movements are interpolated in the haptics thread for stable and soft haptic simulation.
The left mouse button is not used since it is often used for rotating the scene or objects. The right button is mapped to the device's main button. The middle button is used to control the z-position of the device. Press down the button and dragg the mouse up or down to increase or decrease the depth, respectively.
The device can also use the z-buffer to control its z-position. In that case it will read off the front buffer. It will mask away the stylus around the mouse pointer to avoid it being drawn in the way, distrurbing the measure.
The depth position can also be controlled manually by setting or routing.
std::auto_ptr< Depth > Candy::MouseHapticsDevice::depth |
The current depth, the z component, of the mouse position.
When useZBuffer is set to False, this value is controlled by middle-button-dragging the mouse up or down. When it is set to True, the value of the z-buffer at the mouse position will be used instead.
std::auto_ptr< H3D::SFRotation > Candy::MouseHapticsDevice::orientation |
This field controls the orientation of the haptics device, since the mouse pointer only provides position.
std::auto_ptr< H3D::SFBool > Candy::MouseHapticsDevice::useZBuffer |
If this field is set to True the z-buffer value at the mouse position will be used to update the current depth position.
std::auto_ptr< H3D::SFFloat > Candy::MouseHapticsDevice::zScale |
The value of this field scales the up-down movement in pixels into depth movement in meters.
Default value is 0.001, i.e. 1 mm per pixel.