SOSPACEBALLBUTTONEVENT(3iv)

πŸ’– SoSpaceballButtonEvent(3IV) πŸ’–

okay bestie, listen up β€” this is the manual page for SoSpaceballButtonEvent, from section 3IV of the Inventor docs. Spaceball buttons?? pressing and releasing?? yes babe, we're covering all of it. no skips, no crumbs. πŸ¦‹


✨ NAME ✨

SoSpaceballButtonEvent β€” spaceball button press and release events πŸŽ€

🌸 INHERITS FROM 🌸

SoEvent > SoButtonEvent > SoSpaceballButtonEvent

it's giving deep family tree. three whole layers of ancestry, iconic. πŸ‘‘

⭐ SYNOPSIS ⭐

#include <Inventor/events/SoSpaceballButtonEvent.h>

#define SO_SPACEBALL_PRESS_EVENT(EVENT,BUTTON)
    (SoSpaceballButtonEvent::isButtonPressEvent(EVENT,
               SoSpaceballButtonEvent::BUTTON))
#define SO_SPACEBALL_RELEASE_EVENT(EVENT,BUTTON)
    (SoSpaceballButtonEvent::isButtonReleaseEvent(EVENT,
               SoSpaceballButtonEvent::BUTTON))

πŸŽ€ the Button enum (aka the menu of buttons) πŸŽ€

  • SoSpaceballButtonEvent::ANY β€” literally any spaceball button, we're not picky πŸ’…
  • SoSpaceballButtonEvent::BUTTON1 β€” spaceball button 1
  • SoSpaceballButtonEvent::BUTTON2 β€” spaceball button 2
  • SoSpaceballButtonEvent::BUTTON3 β€” spaceball button 3
  • SoSpaceballButtonEvent::BUTTON4 β€” spaceball button 4
  • SoSpaceballButtonEvent::BUTTON5 β€” spaceball button 5
  • SoSpaceballButtonEvent::BUTTON6 β€” spaceball button 6
  • SoSpaceballButtonEvent::BUTTON7 β€” spaceball button 7
  • SoSpaceballButtonEvent::BUTTON8 β€” spaceball button 8
  • SoSpaceballButtonEvent::PICK β€” the spaceball pick button ✨

🧚 methods from the class SoSpaceballButtonEvent 🧚

                     SoSpaceballButtonEvent()
static SoType        getClassTypeId()
void                 setButton(SoSpaceballButtonEvent::Button b)
SoSpaceballButtonEvent::Button
                     getButton() const
static SbBool        isButtonPressEvent(const SoEvent *e,
                          SoSpaceballButtonEvent::Button whichButton)
static SbBool        isButtonReleaseEvent(const SoEvent *e,
                          SoSpaceballButtonEvent::Button whichButton)

πŸ’œ methods it inherited from SoButtonEvent πŸ’œ

void                  setState(SoButtonEvent::State s)
SoButtonEvent::State  getState() const

🌈 methods it inherited from SoEvent 🌈

virtual SoType      getTypeId() const
SbBool              isOfType(SoType type) const
void                setTime(SbTime t)
SbTime              getTime() const
void                setPosition(const SbVec2s &p)
const SbVec2s &     getPosition() const
const SbVec2s &     getPosition(const SbViewportRegion &vpRgn) const
const SbVec2f &     getNormalizedPosition(const SbViewportRegion &vpRgn)
                         const
void                setShiftDown(SbBool isDown)
void                setCtrlDown(SbBool isDown)
void                setAltDown(SbBool isDown)
SbBool              wasShiftDown() const
SbBool              wasCtrlDown() const
SbBool              wasAltDown() const

πŸ‘‘ DESCRIPTION πŸ‘‘

SoSpaceballButtonEvent represents spaceball button press and release events in the Inventor event model. that's the whole vibe. a button goes down, a button comes up, and this class is the one holding the receipts. πŸ’–

πŸ’… METHODS πŸ’…

  • SoSpaceballButtonEvent() β€” the constructor. it's born. welcome to the world, little event. 🍼✨
  • static SoType getClassTypeId() β€” hands you the type id for the SoSpaceballButtonEvent class. your little name tag, bestie. 🏷️
  • void setButton(SoSpaceballButtonEvent::Button b) and SoSpaceballButtonEvent::Button getButton() const β€” set and get which spaceball button generated the event. so like, which one of the buttons did this. 🎯
  • static SbBool isButtonPressEvent(const SoEvent *e, SoSpaceballButtonEvent::Button whichButton) and static SbBool isButtonReleaseEvent(const SoEvent *e, SoSpaceballButtonEvent::Button whichButton) β€” returns whether the event you passed in is a spaceball button press or release event of the button you passed in. and ooooh the tea: when you pass SoSpaceballButtonEvent::ANY, it returns TRUE if the event represents a button press or release of any spaceball button. periodt. πŸ”₯
ngl, those two macros up in the synopsis are just cute little wrappers around exactly these two static methods. iykyk. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

SoEvent, SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoXtDevice


and that's the whole page, bestie!! this was SoSpaceballButtonEvent(3IV), from the 3IV manual set, footer and all β€” mwah, go forth and handle those spaceball events. πŸ’–βœ¨πŸŽ€πŸ’…πŸ«Ά