Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoWinSpaceball Class Reference

VSG extension Translates and reports events for a SpaceBall or SpaceMouse (Magellan) device. More...

#include <Inventor/Win/devices/SoWinSpaceball.h>

+ Inheritance diagram for SoWinSpaceball:

Public Member Functions

 SoWinSpaceball (SoGuiSpaceball::Mask mask=SoGuiSpaceball::ALL)
 Constructor.
 
 ~SoWinSpaceball ()
 Destructor.
 
virtual void enable (SoWidget w, XtEventHandler f, XtPointer data, Window win=NULL)
 Enables the device for the passed window handle.
 
virtual void disable (SoWidget w, XtEventHandler f, XtPointer data)
 Disables the device.
 
virtual const SoEventtranslateEvent (XAnyEvent *xevent)
 Attempts to convert the passed message into an SoEvent.
 
void setRotationScaleFactor (float f)
 The spaceball reports rotations and translations as integers.
 
float getRotationScaleFactor () const
 Returns the rotation scale factor.
 
void setTranslationScaleFactor (float f)
 The spaceball reports rotations and translations as integers.
 
float getTranslationScaleFactor () const
 Returns the translation scale factor.
 
void setFocusToWindow (SbBool flag)
 Win32 does not support focus change.
 
SbBool isFocusToWindow () const
 Win32 does not support focus change.
 
- Public Member Functions inherited from SoWinDevice
void setWindowSize (const SbVec2s &s)
 Sets the size of the window this device is registered for.
 
const SbVec2sgetWindowSize () const
 Gets the size of the window this device is registered for.
 

Static Public Member Functions

static SbBool isSpaceMousePresent ()
 Used in glxWindowProc method from SoWinGLWidget and SoWinMPGLWidget.
 
static SbBool exists ()
 Returns whether or not the spaceball device exists for use.
 

Detailed Description

VSG extension Translates and reports events for a SpaceBall or SpaceMouse (Magellan) device.

This class manages events generated by the spaceball, including spaceball motion (SoMotion3Event), and spaceball button press and release events (SoSpaceballButtonEvent).

SEE ALSO

SoWinDevice, SoMotion3Event, SoSpaceballButtonEvent

Definition at line 55 of file SoWinSpaceball.h.

Constructor & Destructor Documentation

◆ SoWinSpaceball()

SoWinSpaceball::SoWinSpaceball ( SoGuiSpaceball::Mask  mask = SoGuiSpaceball::ALL)

Constructor.

◆ ~SoWinSpaceball()

SoWinSpaceball::~SoWinSpaceball ( )

Destructor.

Member Function Documentation

◆ disable()

virtual void SoWinSpaceball::disable ( SoWidget  w,
XtEventHandler  f,
XtPointer  data 
)
virtual

Disables the device.

Implements SoWinDevice.

◆ enable()

virtual void SoWinSpaceball::enable ( SoWidget  w,
XtEventHandler  f,
XtPointer  data,
Window  win = NULL 
)
virtual

Enables the device for the passed window handle.

When enabled, the callback function f will be invoked when messages occur in the window. data is the clientData which will be passed.

Implements SoWinDevice.

◆ exists()

static SbBool SoWinSpaceball::exists ( )
static

Returns whether or not the spaceball device exists for use.

◆ getRotationScaleFactor()

float SoWinSpaceball::getRotationScaleFactor ( ) const
inline

Returns the rotation scale factor.

Definition at line 104 of file SoWinSpaceball.h.

◆ getTranslationScaleFactor()

float SoWinSpaceball::getTranslationScaleFactor ( ) const
inline

Returns the translation scale factor.

Definition at line 116 of file SoWinSpaceball.h.

◆ isFocusToWindow()

SbBool SoWinSpaceball::isFocusToWindow ( ) const
inline

Win32 does not support focus change.

This method is provided for source compatibility.

Definition at line 133 of file SoWinSpaceball.h.

◆ isSpaceMousePresent()

static SbBool SoWinSpaceball::isSpaceMousePresent ( )
static

Used in glxWindowProc method from SoWinGLWidget and SoWinMPGLWidget.

◆ setFocusToWindow()

void SoWinSpaceball::setFocusToWindow ( SbBool  flag)
inline

Win32 does not support focus change.

This method is provided for source compatibility.

Definition at line 127 of file SoWinSpaceball.h.

◆ setRotationScaleFactor()

void SoWinSpaceball::setRotationScaleFactor ( float  f)
inline

The spaceball reports rotations and translations as integers.

These values must be scaled to be useful. This method sets the rotation scale factor. Default is .006.

Definition at line 99 of file SoWinSpaceball.h.

◆ setTranslationScaleFactor()

void SoWinSpaceball::setTranslationScaleFactor ( float  f)
inline

The spaceball reports rotations and translations as integers.

These values must be scaled to be useful. This method sets the translation the scale factor. Default is .006.

Definition at line 111 of file SoWinSpaceball.h.

◆ translateEvent()

virtual const SoEvent * SoWinSpaceball::translateEvent ( XAnyEvent *  xevent)
virtual

Attempts to convert the passed message into an SoEvent.


Returns a pointer to an internal SoEvent object owned by the class. Do not delete this object. If the message was not generated by this device, then NULL is returned.

Implements SoWinDevice.


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