SoQtSpacemouse Class Reference

SpaceMouse / SpaceBall / SpaceTraveller device driver for Open Inventor. More...

#include <SoQtSpacemouse.h>

List of all members.

Public Types

enum  Mask { MOTION = 0x01, PRESS = 0x02, RELEASE = 0x04, ALL = 0x07 }
 Event mask values. More...

Public Member Functions

 SoQtSpacemouse (Mask mask=SoQtSpacemouse::ALL)
 Constructor.
 ~SoQtSpacemouse ()
 Destructor.
virtual const SoEvent * translateEvent (QEvent *event)
 This converts a window system event into an SoEvent.
virtual void enable (QWidget *w, SoQtEventHandler *f, void *data)
 These functions will enable/disable this device for the passed widget.
virtual void disable (QWidget *w, SoQtEventHandler *f, void *data)
void setRotationScaleFactor (float f)
 Scale the effect of translation / rotation interactions.
float getRotationScaleFactor () const
void setTranslationScaleFactor (float f)
float getTranslationScaleFactor () const

Static Public Member Functions

static SbBool exists ()
 Return whether or not the SpaceMouse device exists for use.
static void beep ()
 Makes the SpaceMouse device beep once.
static void initClass ()


Detailed Description

SpaceMouse / SpaceBall / SpaceTraveller device driver for Open Inventor.

The driver supports all the six degrees of freedom (6DOF) input devices manufactured by 3Dconnexion ( http://www.3dconnexion.com ). It requires the 3DxSoftware driver for Microsoft Windows being installed. On Mac OS X no additional driver is required for the USB devices.

The 6DOF motion is translated to a SoMotion3Event. The buttons state of the device gets translated into a SoSpaceballButtonEvent. A viewer that fully supports the use of a SpaceMouse is SoCustomExaminerViewer.

Author:
Felix Ritter
Date:
2004-2007

Definition at line 47 of file SoQtSpacemouse.h.


Member Enumeration Documentation

Event mask values.

Bitwise OR these to specify whichEvents this device should queue.

Enumerator:
MOTION  SpaceMouse translation and rotation.
PRESS  SpaceMouse button press.
RELEASE  SpaceMouse button release.
ALL  All SpaceMouse events.

Definition at line 57 of file SoQtSpacemouse.h.


Constructor & Destructor Documentation

SoQtSpacemouse::SoQtSpacemouse ( Mask  mask = SoQtSpacemouse::ALL  ) 

Constructor.

SoQtSpacemouse::~SoQtSpacemouse (  ) 

Destructor.


Member Function Documentation

static void SoQtSpacemouse::beep (  )  [static]

Makes the SpaceMouse device beep once.

virtual void SoQtSpacemouse::disable ( QWidget *  w,
SoQtEventHandler *  f,
void *  data 
) [virtual]

virtual void SoQtSpacemouse::enable ( QWidget *  w,
SoQtEventHandler *  f,
void *  data 
) [virtual]

These functions will enable/disable this device for the passed widget.

The callback function f will be invoked when events occur in w. data is the clientData which will be passed.

static SbBool SoQtSpacemouse::exists (  )  [static]

Return whether or not the SpaceMouse device exists for use.

float SoQtSpacemouse::getRotationScaleFactor (  )  const [inline]

Definition at line 94 of file SoQtSpacemouse.h.

float SoQtSpacemouse::getTranslationScaleFactor (  )  const [inline]

Definition at line 96 of file SoQtSpacemouse.h.

static void SoQtSpacemouse::initClass (  )  [static]

void SoQtSpacemouse::setRotationScaleFactor ( float  f  )  [inline]

Scale the effect of translation / rotation interactions.

The SpaceMouse reports rotations and translations as integers. These values must be scaled to be useful. These methods allow the scale values to be set. Default values are .006 for translation and .006 for rotation.

Definition at line 93 of file SoQtSpacemouse.h.

void SoQtSpacemouse::setTranslationScaleFactor ( float  f  )  [inline]

Definition at line 95 of file SoQtSpacemouse.h.

virtual const SoEvent* SoQtSpacemouse::translateEvent ( QEvent *  event  )  [virtual]

This converts a window system event into an SoEvent.

The function returns NULL if the event is not from this device.


The documentation for this class was generated from the following file:

Generated on Sat Sep 3 18:39:32 2011 for MeVisLab Toolbox Reference by  doxygen 1.5.8