SOXTSPACEBALL(3iv)
π NAME π
SoXtSpaceball β ok bestie, this one translates and reports events for the spaceball β¨
π¦ INHERITS FROM π¦
SoXtDevice > SoXtSpaceball
(so it's giving legacy, it's giving lineage, it's giving a whole family tree π³)
β¨ SYNOPSIS β¨
#include <Inventor/Xt/devices/SoXtSpaceball.h>
okay so first up, the enum, and yes you need to know it:
enum Mask {
SoXtSpaceball::MOTION Spaceball translation and rotation events
SoXtSpaceball::PRESS Spaceball button press events
SoXtSpaceball::RELEASE Spaceball button release events
SoXtSpaceball::ALL All spaceball events
}
and here's the methods from class SoXtSpaceball, literally all of them:
SoXtSpaceball(SoXtSpaceball::Mask mask =
SoXtSpaceball::ALL)
SoXtSpaceball(Display *d, SoXtSpaceball::Mask mask =
SoXtSpaceball::ALL)
~SoXtSpaceball()
void setRotationScaleFactor(float f)
float getRotationScaleFactor() const
void setTranslationScaleFactor(float f)
float getTranslationScaleFactor() const
static SbBool exists()
static SbBool exists(Display *d)
and these ones are inherited from class SoXtDevice β they come with the whole vibe:
virtual void enable(Widget w, XtEventHandler f, XtPointer
data, Window win = NULL)
virtual void disable(Widget w, XtEventHandler f, XtPointer
data)
virtual const SoEvent * translateEvent(XAnyEvent *xevent)
void setWindowSize(const SbVec2s &size)
const SbVec2s & getWindowSize() const
πΈ DESCRIPTION πΈ
This class manages events generated by the spaceball, and yes we're talking spaceball motion (SoMotion3Event) plus spaceball button press and release events (SoSpaceballButtonEvent). it's the whole handler situation, bestie. she handles it. π
π₯ METHODS π₯
π constructors & destructor
SoXtSpaceball(SoXtSpaceball::Mask mask =
SoXtSpaceball::ALL)
SoXtSpaceball(Display *d, SoXtSpaceball::Mask mask =
SoXtSpaceball::ALL)
~SoXtSpaceball()
Constructor and destructor. what you do is pass to the constructor an enumerated value specifying which spaceball events are of interest β that's the mask argument, and she's picky about it. only those events will be reported to the callback routine registered on each widget, no extras, no leftovers, we're being selective π«Ά
and the first constructor? it uses the X display which was set in SoXt::init(). so it already knows where home is. iconic behavior honestly.
π rotation scale factor
void setRotationScaleFactor(float f)
float getRotationScaleFactor() const
Set and get the rotation scale factor. the scale factor is applied to the rotation value generated by the spaceball device. and the default rotation scale factor is .006. yes, .006. write it down. put it in your notes app. π
π translation scale factor
void setTranslationScaleFactor(float f)
float getTranslationScaleFactor() const
Set and get the translation scale factor. this one gets applied to the translation value generated by the spaceball device. and the default translation scale factor is also .006. twins!! β¨
π¦ does it even exist though
static SbBool exists()
static SbBool exists(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. so likeβ¦ vibe check on the hardware. if she's there, TRUE. if notβ¦ π
π SEE ALSO π
SoXt, SoXtDevice, SoMotion3Event, SoSpaceballButtonEvent
go read those too, no skipping, I'll know π
and that's the whole thing bestie, that was SoXtSpaceball(3IV)() β stamped and dated and everything, straight from the SoXtSpaceball(3IV) manual page, mwah π go forth and handle your events β¨π slay πβ¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms