1SoXtSpaceball(3IV)()                                      SoXtSpaceball(3IV)()
2
3
4

NAME

6       SoXtSpaceball — translates and reports events for the spaceball
7

INHERITS FROM

9       SoXtDevice > SoXtSpaceball
10

SYNOPSIS

12       #include <Inventor/Xt/devices/SoXtSpaceball.h>
13
14     enum Mask {
15          SoXtSpaceball::MOTION   Spaceball translation and rotation events
16          SoXtSpaceball::PRESS    Spaceball button press events
17          SoXtSpaceball::RELEASE  Spaceball button release events
18          SoXtSpaceball::ALL      All spaceball events
19     }
20
21          Methods from class SoXtSpaceball:
22
23                         SoXtSpaceball(SoXtSpaceball::Mask  mask  = SoXtSpace‐
24                              ball::ALL)
25                         SoXtSpaceball(Display *d, SoXtSpaceball::Mask mask  =
26                              SoXtSpaceball::ALL)
27                         ~SoXtSpaceball()
28     void                setRotationScaleFactor(float f)
29     float               getRotationScaleFactor() const
30     void                setTranslationScaleFactor(float f)
31     float               getTranslationScaleFactor() const
32     static SbBool       exists()
33     static SbBool       exists(Display *d)
34
35          Methods from class SoXtDevice:
36
37     virtual  void             enable(Widget  w,  XtEventHandler  f, XtPointer
38                                   data, Window win = NULL)
39     virtual void             disable(Widget w,  XtEventHandler  f,  XtPointer
40                                   data)
41     virtual const SoEvent *  translateEvent(XAnyEvent *xevent)
42     void                     setWindowSize(const SbVec2s &size)
43     const SbVec2s &          getWindowSize() const
44
45

DESCRIPTION

47       This  class manages events generated by the spaceball, including space‐
48       ball motion (SoMotion3Event), and spaceball button  press  and  release
49       events (SoSpaceballButtonEvent).
50

METHODS

52                         SoXtSpaceball(SoXtSpaceball::Mask  mask  = SoXtSpace‐
53                              ball::ALL)
54                         SoXtSpaceball(Display *d, SoXtSpaceball::Mask mask  =
55                              SoXtSpaceball::ALL)
56                         ~SoXtSpaceball()
57          Constructor  and  destructor.  Pass to the constructor an enumerated
58          value specifying which spaceball events are of interest. Only  those
59          events  will  be reported to the callback routine registered on each
60          widget.  The first constructor uses the X display which was  set  in
61          SoXt::init().
62
63     void                setRotationScaleFactor(float f)
64     float               getRotationScaleFactor() const
65          Set  and  get the rotation scale factor. The scale factor is applied
66          to the rotation value generated by the spaceball device. The default
67          rotation scale factor is .006.
68
69     void                setTranslationScaleFactor(float f)
70     float               getTranslationScaleFactor() const
71          Set  and  get  the  translation  scale  factor.  The scale factor is
72          applied to the translation value generated by the spaceball  device.
73          The default translation scale factor is .006.
74
75     static SbBool       exists()
76     static SbBool       exists(Display *d)
77          This  returns  TRUE if the spaceball exists, either on the X display
78          which was set in SoXt::init(),  or on the passed display.
79
80

SEE ALSO

82       SoXt, SoXtDevice, SoMotion3Event, SoSpaceballButtonEvent
83
84
85
86
87                                                          SoXtSpaceball(3IV)()
Impressum