SoEventManager(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

πŸ’– SoEventManager πŸ’–

okay bestie, so this is the Coin3D man page for SoEventManager(3), and honestly? she's a baddie. let's get into it ✨


🌸 NAME 🌸

SoEventManager β€” the class that handles events for a Coin3D viewer. that's it, that's the job, and she does it flawlessly πŸ’…


✨ SYNOPSIS ✨

first things first, you gotta pull her in:

#include <Inventor/SoEventManager.h>

πŸŽ€ Public Types πŸŽ€

enum NavigationState { NO_NAVIGATION, JUST_NAVIGATION, MIXED_NAVIGATION }

πŸ¦‹ Public Member Functions πŸ¦‹

virtual ~SoEventManager ()
virtual void setSceneGraph (SoNode *const sceneroot)
virtual SoNode * getSceneGraph (void) const
virtual void setCamera (SoCamera *camera)
virtual SoCamera * getCamera (void) const
virtual SbBool processEvent (const SoEvent *const event)
virtual void setNavigationState (NavigationState state)
virtual NavigationState getNavigationState (void) const
int getNumSoScXMLStateMachines (void) const
SoScXMLStateMachine * getSoScXMLStateMachine (int idx) const
void addSoScXMLStateMachine (SoScXMLStateMachine *sm)
void removeSoScXMLStateMachine (SoScXMLStateMachine *sm)
virtual void setSize (const SbVec2s &newsize)
virtual void setOrigin (const SbVec2s &newOrigin)
virtual void setViewportRegion (const SbViewportRegion &newregion)
const SbViewportRegion & getViewportRegion (void) const
virtual void setHandleEventAction (SoHandleEventAction *hea)
virtual SoHandleEventAction * getHandleEventAction (void) const

🌈 Protected Member Functions 🌈

virtual SbBool actuallyProcessEvent (const SoEvent *const event)

πŸ‘‘ Detailed Description πŸ‘‘

okay so, plot twist: SoEventManager is the one providing event handling for a Coin3D viewer. main character energy fr fr.

she catches Coin events β€” which usually got translated from GUI events by whatever GUI binding you're using, iykyk β€” and then she passes them along, either to the state machine or straight to the scene graph, depending on which navigation mode you're in. no cap.

she's the event interface for the Coin3D navigation system that's built on ScXML. and here's the tea: SoEventManager and SoRenderManager together supersede SoSceneManager, which is now literally just a wrapper around these two. so if you were still out here using the old one... bestie. 😭

also she's the one being used by the QuarterWidget in Quarter, which is the Qt binding for Coin3D. iconic behavior, honestly 🫢


πŸ”₯ Member Enumeration Documentation πŸ”₯

πŸ’œ enum SoEventManager::NavigationState

this one sets how events are handled. pick your fighter:

  • NO_NAVIGATION β€” forwards the events only to the scene graph. that's it, no detours.
  • JUST_NAVIGATION β€” forwards the events only to the state machines. state machines only, periodt.
  • MIXED_NAVIGATION β€” forwards the events to the scene graph first. and if it doesn't get handled there? then the events get forwarded to the state machines. two-step slay πŸ’…

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

SoEventManager::~SoEventManager () [virtual]

the destructor. πŸ’€

when invoked, she destructs all the subobjects she still has handles on. everything she's holding? gone. bye.


🌸 Member Function Documentation 🌸

void SoEventManager::setSceneGraph (SoNode *const sceneroot) [virtual]

sets the node that's sitting at the top of the scene graph we're managing. heads up: the sceneroot node's reference count gets increased by 1, and any previously set scene graph top node gets its reference count decreased by 1. so like, don't be surprised, that's just how she rolls.

See also: getSceneGraph

SoNode * SoEventManager::getSceneGraph (void ) const [virtual]

returns a pointer to the root of the scene graph. your girl, the root node, right there 🫢

void SoEventManager::setCamera (SoCamera * camera) [virtual]

sets the camera to be used. that's the whole vibe.

SoCamera * SoEventManager::getCamera (void ) const [virtual]

returns the current camera. whoever's holding the lens rn.

SbBool SoEventManager::processEvent (const SoEvent *const event) [virtual]

handles the event. and depending on the navigation state, she forwards it to the state machines and/or the scene graph. lowkey flexible of her.

void SoEventManager::setNavigationState (NavigationState state) [virtual]

this method sets the navigation mode of the scene manager. the navigation mode is the thing that decides which system the user uses to navigate the 3D model. it's giving "choose your own adventure" but make it 3D ✨

SoEventManager::NO_NAVIGATION is the default setting. remember that.

See also: SoEventManager::NavigationState, getNavigationState

SoEventManager::NavigationState SoEventManager::getNavigationState (void ) const [virtual]

this method returns which state the camera navigation system is currently in. vibe check on the navigation system, basically.

See also: SoEventManager::NavigationState, setNavigationState

int SoEventManager::getNumSoScXMLStateMachines (void ) const

returns the number of SCXML state machines registered on the SoEventManager object. just a lil headcount πŸ“

SoScXMLStateMachine * SoEventManager::getSoScXMLStateMachine (int idx) const

returns the pointer to the Nth (idx) SCXML state machine registered on the SoSceneManager object.

⚠️ bestie listen: the idx argument must be a valid index, not outside the actual range of SCXML state machine object indices. no reaching into the void, okay? 😭

void SoEventManager::addSoScXMLStateMachine (SoScXMLStateMachine * sm)

adds an SCXML state machine object to the SoEventManager's event pipeline. welcome to the pipeline, girl πŸ’…

the calling code is responsible for deleting the passed-in state machine after removeSoScXMLStateMachine() has been invoked. so that's on you, not on her.

🫢 Note: this behavior changed between Coin 3.1 and later β€” because SoEventManager used to destruct the state machines upon its own destruction. so if you're on old Coin, don't come for her, she's evolved.

void SoEventManager::removeSoScXMLStateMachine (SoScXMLStateMachine * sm)

removes the SoSceneManager object reference to an SCXML state machine. and just so we're clear: it will just be removed, not destructed. no violence here.

if no reference to the given SCXML state machine exists, nothing will happen. she'll simply not respond. and honestly? same.

void SoEventManager::setSize (const SbVec2s & newsize) [virtual]

set the size of the rendering area for the viewport within the current window.

void SoEventManager::setOrigin (const SbVec2s & newOrigin) [virtual]

sets only the origin of the viewport region within the rendering window. just the origin, nothing else, she's being specific.

See also: setViewportRegion(), setWindowSize()

void SoEventManager::setViewportRegion (const SbViewportRegion & newregion) [virtual]

sets the current viewport region. this will overwrite the default viewport region that got created in the constructor. so yeah, the default is getting replaced, no hard feelings.

See also: getViewportRegion()

const SbViewportRegion & SoEventManager::getViewportRegion (void ) const

returns the viewport region used by the event manager. that's the one she's working with πŸ’–

void SoEventManager::setHandleEventAction (SoHandleEventAction * handleeventaction) [virtual]

set the action to use for event handling. this overrides the default action that was made in the constructor. so you're swapping out the default, got it? ✨

SoHandleEventAction * SoEventManager::getHandleEventAction (void ) const [virtual]

returns a pointer to the event handler action. there she is πŸ‘‘

SbBool SoEventManager::actuallyProcessEvent (const SoEvent *const event) [protected], [virtual]

forwards the event to the scene graph. the actual, literal, no-filter forwarding. 🌈


πŸ¦‹ Author πŸ¦‹

generated automatically by Doxygen for Coin, straight from the source code. she was born this way, no cap.


and that's the whole page bestie, you ate it πŸ’…βœ¨

🌸 Version 4.0.10 β€” Thu Jun 25 2026 00:00:00 β€” SoEventManager(3). mwah, go forth and handle some events πŸ«ΆπŸŽ€
πŸ“¦ where this page comes from