SoXtSpaceball — translates and reports events for the spaceball
Contents
Description
This class manages events generated by the spaceball, including spaceball motion (SoMotion3Event), and
spaceball button press and release events (SoSpaceballButtonEvent).
Inherits From
SoXtDevice > SoXtSpaceball
Methods
SoXtSpaceball(SoXtSpaceball::Maskmask=SoXtSpaceball::ALL)SoXtSpaceball(Display*d,SoXtSpaceball::Maskmask=SoXtSpaceball::ALL)~SoXtSpaceball()
Constructor and destructor. Pass to the constructor an enumerated value specifying which spaceball
events are of interest. Only those events will be reported to the callback routine registered on each
widget. The first constructor uses the X display which was set in SoXt::init().
voidsetRotationScaleFactor(floatf)floatgetRotationScaleFactor()const
Set and get the rotation scale factor. The scale factor is applied to the rotation value generated by
the spaceball device. The default rotation scale factor is .006.
voidsetTranslationScaleFactor(floatf)floatgetTranslationScaleFactor()const
Set and get the translation scale factor. The scale factor is applied to the translation value
generated by the spaceball device. The default translation scale factor is .006.
staticSbBoolexists()staticSbBoolexists(Display*d)
This returns TRUE if the spaceball exists, either on the X display which was set in SoXt::init(), or
on the passed display.
Name
SoXtSpaceball — translates and reports events for the spaceball
See Also
SoXt,SoXtDevice,SoMotion3Event,SoSpaceballButtonEventSoXtSpaceball(3IV)()
Synopsis
#include<Inventor/Xt/devices/SoXtSpaceball.h>enumMask{SoXtSpaceball::MOTION Spaceball translation and rotation events
SoXtSpaceball::PRESS Spaceball button press events
SoXtSpaceball::RELEASE Spaceball button release events
SoXtSpaceball::ALL All spaceball events
}
Methods from class SoXtSpaceball:
SoXtSpaceball(SoXtSpaceball::Maskmask=SoXtSpaceball::ALL)SoXtSpaceball(Display*d,SoXtSpaceball::Maskmask=SoXtSpaceball::ALL)~SoXtSpaceball()voidsetRotationScaleFactor(floatf)floatgetRotationScaleFactor()constvoidsetTranslationScaleFactor(floatf)floatgetTranslationScaleFactor()conststaticSbBoolexists()staticSbBoolexists(Display*d)
Methods from class SoXtDevice:
virtualvoidenable(Widgetw,XtEventHandlerf,XtPointerdata,Windowwin=NULL)virtualvoiddisable(Widgetw,XtEventHandlerf,XtPointerdata)virtualconstSoEvent*translateEvent(XAnyEvent*xevent)voidsetWindowSize(constSbVec2s&size)constSbVec2s&getWindowSize()const