SOEVENT(3iv)

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

okay bestie, buckle up β€” this is the SoEvent page, from the 3IV manual, and it's literally the mother of every event in Inventor. base class energy only. πŸ‘‘


🌸 NAME 🌸

SoEvent β€” the base class for all events. like, every single one. the blueprint. the blueprint-iest blueprint. ✨


🧬 INHERITS FROM 🧬

SoEvent

(yes girl, it's the top of the food chain β€” nothing above her, she is the ancestor 🫢)


πŸ“œ SYNOPSIS πŸ“œ

#include <Inventor/events/SoEvent.h>

   Methods from class SoEvent:

                  SoEvent()
virtual             ~SoEvent()
virtual SoType      getTypeId() const
static SoType       getClassTypeId()
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 πŸ‘‘

SoEvent is the base class for events in the Inventor event model, periodt. πŸ’…

so like, an event typically represents a user action β€” a mouse button getting pressed, a keyboard key getting released, that whole vibe. and SoEvent is where all the general info that every single Inventor event carries lives, which is:

  • the time the event occurred ⏰
  • the position of the locater when the event occurred πŸ“
  • the state of the modifier keys when the event occurred ⌨️

that's the shared DNA, bestie. everything else inherits it. 🧬✨


πŸ› οΈ METHODS πŸ› οΈ

  • SoEvent()
  • virtual ~SoEvent()

Constructor and destructor. the hello and the bye. πŸŽ€


  • virtual SoType getTypeId() const β€” returns the type id for this event instance. iykyk. πŸ”

  • static SoType getClassTypeId() β€” returns the type id for the SoEvent class itself. the class-level one, not the instance one. don't mix them up girlie. πŸ’«

  • SbBool isOfType(SoType type) const β€” this returns TRUE if the event is an instance of, or derived from, an event of the passed type. so like, family tree check. πŸŒ³βœ…

  • void setTime(SbTime t)
  • SbTime getTime() const

Set and get the time at which the event occurred. when did it happen? this knows. ⏱️


  • void setPosition(const SbVec2s &p)
  • const SbVec2s & getPosition() const

Set the window pixel location of the cursor when the event occurred. the position is relative to the lower left corner of the window in which the event occurred. lower. left. corner. write that down. πŸ“


  • const SbVec2s & getPosition(const SbViewportRegion &vpRgn) const

Get the viewport pixel location of the cursor when the event occurred, relative to the specified viewport region. same cursor, different frame of reference. πŸ–ΌοΈ


  • const SbVec2f & getNormalizedPosition(const SbViewportRegion &vpRgn) const

Get the normalized location of the cursor when the event occurred, relative to the specified viewport region. the returned value will lie between 0.0 and 1.0. cute, contained, well-behaved. πŸŽ€


  • void setShiftDown(SbBool isDown)
  • void setCtrlDown(SbBool isDown)
  • void setAltDown(SbBool isDown)

Set whether the modifier keys were down when the event occurred. shift? ctrl? alt? tell it. βŒ¨οΈπŸ’…


  • SbBool wasShiftDown() const
  • SbBool wasCtrlDown() const
  • SbBool wasAltDown() const

Get whether the modifier keys were down when the event occurred. past tense for a reason β€” the moment already happened bestie. πŸ•°οΈ


πŸ‘€ SEE ALSO πŸ‘€

SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoXtDevice, SoXtRenderArea

(the whole friend group fr fr 🫢 go read them too)


and that's the page!! πŸ’œ this was SoEvent(3IV) β€” source/version tag SoEvent(3IV) and, well, the date slot is literally empty (mysterious. iconic. no cap πŸ•³οΈβœ¨) β€” anyway ily, go handle some events responsibly. bye bestie!! πŸŽ€πŸ¦‹πŸŒˆ