SoEvent(3)
π NAME π
SoEvent β bestie, this is the base class for all Coin events. The blueprint. The blueprint-est. Every event in Coin is basically descended from this one, no cap. π
β¨ SYNOPSIS β¨
#include <Inventor/events/SoEvent.h>
Inherited by SoButtonEvent, SoLocation2Event, and SoMotion3Event.
π Public Member Functions
virtual SoType getTypeId (void) const
SoEvent (void)
virtual ~SoEvent ()
SbBool isOfType (SoType type) const
void setTime (const SbTime t)
SbTime getTime (void) const
void setPosition (const SbVec2s &p)
const SbVec2s & getPosition (void) const
const SbVec2s & getPosition (const SbViewportRegion &vpRgn) const
const SbVec2f & getNormalizedPosition (const SbViewportRegion &vpRgn) const
void setShiftDown (SbBool isDown)
SbBool wasShiftDown (void) const
void setCtrlDown (SbBool isDown)
SbBool wasCtrlDown (void) const
void setAltDown (SbBool isDown)
SbBool wasAltDown (void) const
πΈ Static Public Member Functions
static SoType getClassTypeId (void)
static void initClass (void)
π¦ DETAILED DESCRIPTION π¦
The SoEvent class is the base class for all Coin events. Say it with me: base class. Everything else is giving spin-off energy. π
Coin contains its own set of event classes, independent of the underlying window system. That's the whole point, bestie β Coin does NOT care what windowing drama your OS is going through. π«Ά
Upon system specific events, a translation is done by the window specific device classes into one of the Coin event object classes listed below. The event is then typically sent by the render area to an SoSceneManager which will apply it to the scene graph through an SoHandleEventAction. Like a little relay race of information. πβοΈβ¨
Events may be caught by the user by attaching an SoEventCallback node to the scene graph, or they can automatically be handled by a dragger or manipulator in the graph. So like, you can intercept, or you can let the dragger cook. Either way, iconic. π
π See also
SoButtonEvent,SoKeyboardEvent,SoLocation2Event,SoMotion3EventSoMouseButtonEvent,SoSpaceballButtonEventSoEventCallback,SoHandleEventAction
π§ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION π§
SoEvent::SoEvent (void )
Constructor, will set all modifiers to "off" state. Fresh start, clean slate, no keys held down, we're all chill. π
SoEvent::~SoEvent () [virtual]
Destructor. It's over, bestie. π
π MEMBER FUNCTION DOCUMENTATION π
SoType SoEvent::getClassTypeId (void ) [static]
This static method returns the SoType object associated with objects of this class. It's the class-level ID, the group chat handle. π¬
SoType SoEvent::getTypeId (void ) const [virtual]
Returns the type identification of an object derived from a class inheriting SoEvent. This is used for runtime type checking and "downward" casting.
Returns the actual type id of an instantiated object.
Reimplemented in SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, and SoSpaceballButtonEvent. So yeah, the whole squad overrides this one. π
void SoEvent::initClass (void ) [static]
Initialize SoEvent and all its known subclasses (i.e. all subclasses which are part of the standard classes in the Coin library).
This method is called from SoDB::init(), so it is very unlikely that you will have to call it explicitly. Let the library handle its own business, bestie, it's got this. π«Ά
SbBool SoEvent::isOfType (SoType type) const
Returns TRUE if this object either has the same type as the given type parameter, or if type belongs to a superclass of ourselves. It's the "do I know you? are you my ancestor?" check. π§¬
void SoEvent::setTime (const SbTime t)
From a system specific device object, set the time the event occurred. Timestamping, but make it Coin. β°
See also: getTime()
SbTime SoEvent::getTime (void ) const
Returns the time the event occurred. When did it happen? Here's your answer. β±οΈ
See also: getPosition(), wasShiftDown(), wasCtrlDown(), wasAltDown()
void SoEvent::setPosition (const SbVec2s & p)
From a system specific device object, set the mouse pointer position when the event occurred. π
See also: getPosition(), getNormalizedPosition()
const SbVec2s & SoEvent::getPosition (void ) const
Returns the mouse pointer position when the event occurred. The coordinates are given relative to the window coordinates. πͺ
See also: getNormalizedPosition(), getTime(), wasShiftDown(), wasCtrlDown(), wasAltDown()
const SbVec2s & SoEvent::getPosition (const SbViewportRegion & vpRgn) const
Returns the mouse pointer position when the event occurred. The coordinates are given relative to the viewport coordinates. Different frame of reference, same mouse, periodt. πΌοΈ
See also: getNormalizedPosition(), getTime(), wasShiftDown(), wasCtrlDown(), wasAltDown()
const SbVec2f & SoEvent::getNormalizedPosition (const SbViewportRegion & vpRgn) const
Returns the mouse pointer position when the event occurred. The coordinates are given relative to the viewport coordinates, normalized according to the size of the viewport. So like, 0.0 to 1.0 vibes. Beautiful, portable, slay. β¨
See also: getPosition(), getTime(), wasShiftDown(), wasCtrlDown(), wasAltDown()
void SoEvent::setShiftDown (SbBool isDown)
From a system specific device object, set the state of the Shift key(s) when the event occurred.
See also: wasShiftDown(), setCtrlDown(), setAltDown()
SbBool SoEvent::wasShiftDown (void ) const
Returns state of Shift key(s) when the event occurred.
See also: wasCtrlDown(), wasAltDown(), getPosition(), getTime()
void SoEvent::setCtrlDown (SbBool isDown)
From a system specific device object, set the state of the Ctrl key(s) when the event occurred.
See also: wasCtrlDown(), setShiftDown(), setAltDown()
SbBool SoEvent::wasCtrlDown (void ) const
Returns state of Ctrl key(s) when the event occurred.
See also: wasShiftDown(), wasAltDown(), getPosition(), getTime()
void SoEvent::setAltDown (SbBool isDown)
From a system specific device object, set the state of the Alt key(s) when the event occurred.
See also: wasAltDown(), setCtrlDown(), setShiftDown()
SbBool SoEvent::wasAltDown (void ) const
Returns state of Alt key(s) when the event occurred.
See also: wasShiftDown(), wasCtrlDown(), getPosition(), getTime()
π AUTHOR π
Generated automatically by Doxygen for Coin from the source code. Not me writing it by hand, it's giving machine-generated but make it β¨documentationβ¨.
Okay bestie, that's the whole page! This was Version 4.0.10, dated Thu Jun 25 2026 00:00:00, and it lives in the Coin manual. Go forth and handle your events, main character. π ππ¦πΈπ
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms