SoEvent(3)
β¨ SoEvent(3) β¨
okay bestie, welcome to the SoEvent(3) glow-up β this one lives in Coin's Library Functions Manual, and it is literally the main character of the whole event system. she's the base class, everybody else is just vibing in her shadow π
πΈ NAME πΈ
SoEvent β the base class for all Coin events. the mother of all events, fr fr π
π¦ SYNOPSIS π¦
#include <Inventor/events/SoEvent.h>
Inherited by SoButtonEvent, SoLocation2Event, and SoMotion3Event.
π Public Member Functions π
SoEvent (void)
virtual ~SoEvent ()
SbBool isOfType (SoType type) const
virtual SoType getTypeId (void) 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.
Coin contains its own set of event classes, independent of the underlying window system. she does NOT care what windowing system you're running, she's self-sufficient like that π
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 scenegraph through an SoHandleEventAction.
Events may be caught by the user by attaching an SoEventCallback node to the scenegraph, or it can automatically be handled by a dragger or manipulator in the graph.
See also π
SoButtonEvent,SoKeyboardEvent,SoLocation2Event,SoMotion3EventSoMouseButtonEvent,SoSpaceballButtonEventSoEventCallback,SoHandleEventAction
π CONSTRUCTOR & DESTRUCTOR DOCUMENTATION π
πΈ SoEvent::SoEvent (void ) πΈ
Constructor, will set all modifiers to "off" state. everyone starts un-pressed, as they should π«Ά
Referenced by getClassTypeId(), SoButtonEvent::initClass(), SoLocation2Event::initClass(), SoMotion3Event::initClass(), SoMouseButtonEvent::isButtonPressEvent(), SoSpaceballButtonEvent::isButtonPressEvent(), SoMouseButtonEvent::isButtonReleaseEvent(), SoSpaceballButtonEvent::isButtonReleaseEvent(), SoKeyboardEvent::isKeyPressEvent(), and SoKeyboardEvent::isKeyReleaseEvent().
π SoEvent::~SoEvent () [virtual] π
Destructor. she's leaving, say bye π
β¨ MEMBER FUNCTION DOCUMENTATION β¨
π 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. like a little "do you know my family?" check π
References getTypeId(), and SoType::isDerivedFrom().
Referenced by SoMouseButtonEvent::isButtonPressEvent(), SoSpaceballButtonEvent::isButtonPressEvent(), SoMouseButtonEvent::isButtonReleaseEvent(), SoSpaceballButtonEvent::isButtonReleaseEvent(), SoKeyboardEvent::isKeyPressEvent(), and SoKeyboardEvent::isKeyReleaseEvent().
π SoType SoEvent::getClassTypeId (void ) [static]
This static method returns the SoType object associated with objects of this class.
References SoEvent().
π SoType SoEvent::getTypeId (void ) const [virtual]
Returns the actual type id of an instantiated object. yes bestie, the real one π₯
Reimplemented in SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, and SoSpaceballButtonEvent.
Referenced by isOfType().
π void SoEvent::setTime (const SbTime t)
From a system specific device object, set the time the event occurred. stamp it, queen β°
See also getTime()
π SbTime SoEvent::getTime (void ) const
Returns the time the event occurred.
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. pin it, drop it π
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. same vibe, different frame of reference π¦
See also getNormalizedPosition(), getTime(), wasShiftDown(), wasCtrlDown(), wasAltDown()
References SbViewportRegion::getViewportOriginPixels().
π 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-to-1 energy instead of pixel energy β¨
See also getPosition(), getTime(), wasShiftDown(), wasCtrlDown(), wasAltDown()
References SbViewportRegion::getViewportOriginPixels(), and SbViewportRegion::getViewportSizePixels().
π 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()
Referenced by SoKeyboardEvent::getPrintableCharacter(), and SoExtSelection::handleEvent().
π 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()
Referenced by SoHandleBoxDragger::dragStart().
π 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()
π void SoEvent::initClass (void ) [static]
Initialize SoEvent and all it's 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's very unlikely that you will have to call it explicitly. she's already handled, bestie, don't worry about it π
References SoType::badType(), and SoType::createType().
Referenced by SoDB::init().
π§ AUTHOR π§
Generated automatically by Doxygen for Coin from the source code. no human wrote this by hand and honestly? slay π
and that's the whole page, bestie! π the footer says Coin, Version 2.5.0, and the manual page is SoEvent(3) β so go forth and handle those events, you absolute icon ππ
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms