SoEventManager(3)
π NAME π
SoEventManager β the class that handles events for a Coin3D viewer. That's the whole job bestie, and it ate. π
π¦ SYNOPSIS π¦
#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 SoEventManager is literally the event-handling queen for a Coin3D viewer. π
It receives Coin events (usually translated from GUI events by whatever GUI binding you're using) and then passes them along to the state machine or straight to the scene graph β depends on the navigation mode, no cap. SoEventManager implements the event interface for the Coin3D navigation system, which is based on ScXML. π§
And the lore: SoEventManager and SoRenderManager together supersede SoSceneManager, which is now just a wrapper around these two classes. Periodt. π It's the class the QuarterWidget uses in Quarter (that's the Qt binding for Coin3D, iykyk). π«Ά
π Member Enumeration Documentation π
β enum SoEventManager::NavigationState β
This one sets how events are handled. The vibe check for your input, basically. β¨
Enumerator:
- NO_NAVIGATION β forwards the events only to the scene graph.
- JUST_NAVIGATION β forwards the events only to the state machines.
- MIXED_NAVIGATION β forwards the events to the scene graph first. If it doesn't get handled, then the events get forwarded to the state machines. Best of both worlds, honestly. π
π Constructor & Destructor Documentation π
π SoEventManager::~SoEventManager () [virtual] π
Destructor. π«§
When it's invoked, the destructor destructs all subobjects it still has handles on. So like, it cleans up after itself, slay. π§Ήβ¨
π Member Function Documentation π
π¦ void SoEventManager::setSceneGraph (SoNode *const sceneroot) [virtual] π¦
Sets the node that's the top of the scene graph we're managing. The sceneroot node reference count gets increased by 1, and whatever scene graph top node was set before gets its reference count decreased by 1. Mutual, fair, iconic. π
See also: getSceneGraph
π¦ SoNode * SoEventManager::getSceneGraph (void ) const [virtual] π¦
Returns the pointer to the root of the scene graph. Here's your crown bestie π
π¦ void SoEventManager::setCamera (SoCamera * camera) [virtual] π¦
Sets the camera to be used. That's it, that's the function. πΈ
π¦ SoCamera * SoEventManager::getCamera (void ) const [virtual] π¦
Returns the current camera. Smile! π
π¦ SbBool SoEventManager::processEvent (const SoEvent *const event) [virtual] π¦
Handles the event. Depending on the navigation state, this forwards the event to the state machines and/or the scene graph. Yeah it's the group-chat forwarder of the Coin3D world. π
π¦ void SoEventManager::setNavigationState (NavigationState state) [virtual] π¦
This method sets the navigation mode of the scene manager. The navigation mode decides the system the user uses to navigate the 3D model. π§
Heads up bestie: SoEventManager::NO_NAVIGATION is the default setting. π
See also: SoEventManager::NavigationState, getNavigationState
π¦ SoEventManager::NavigationState SoEventManager::getNavigationState (void ) const [virtual] π¦
This method returns which state the camera navigation system is in. Basically "what mode are we in rn" energy. π«Ά
See also: SoEventManager::NavigationState, setNavigationState
π¦ int SoEventManager::getNumSoScXMLStateMachines (void ) const π¦
Returns the number of SCXML state machines registered on the SoEventManager object. Count 'em. π’
π¦ SoScXMLStateMachine * SoEventManager::getSoScXMLStateMachine (int idx) const π¦
Returns the pointer to the Nth (idx) SCXML state machine registered on the SoSceneManager object.
Okay so real talk: the idx argument must be a valid index, not outside the actual range of SCXML state machine object indices. Don't be out here indexing into the void. π
π¦ void SoEventManager::addSoScXMLStateMachine (SoScXMLStateMachine * sm) π¦
Adds an SCXML state machine object to the SoEventManager's event pipeline. β‘
Careful bestie: if it's not removed before SoSceneManager destruction, the SoSceneManager destructor will delete it. π
π¦ void SoEventManager::removeSoScXMLStateMachine (SoScXMLStateMachine * sm) π¦
Removes the SoSceneManager object's reference to an SCXML state machine. It will just be removed, not destructed. It's giving "we're not deleting you, we're just not inviting you to the party". π
If no reference to the given SCXML state machine exists, nothing will happen. No drama, no error. β¨
π¦ 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, don't get greedy. π
See also: setViewportRegion(), setWindowSize()
π¦ void SoEventManager::setViewportRegion (const SbViewportRegion & newregion) [virtual] π¦
Sets the current viewport region. This will overwrite the default viewport region that was created in the constructor. Out with the old, in with the new. π
See also: getViewportRegion()
π¦ const SbViewportRegion & SoEventManager::getViewportRegion (void ) const π¦
Returns the viewport region used by the event manager. πΌοΈ
π¦ 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. Main character energy, honestly. π
π¦ SoHandleEventAction * SoEventManager::getHandleEventAction (void ) const [virtual] π¦
Returns the pointer to the event handler action. π«Ά
π¦ SbBool SoEventManager::actuallyProcessEvent (const SoEvent *const event) [protected], [virtual] π¦
Forwards the event to the scene graph. Short, sweet, does exactly what it says on the tin. β¨
βοΈ Author βοΈ
Generated automatically by Doxygen for Coin from the source code. It wrote itself, we just vibed with it. π§π
And that's a wrap, bestie! This page is from Coin, Version 3.1.3, and it's the SoEventManager(3) manual page. Go forth and handle those events. Periodt. π
β¨π
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.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