|
| SoEvent () |
| Constructor.
|
|
virtual | ~SoEvent () |
| Destructor.
|
|
virtual SoType | getTypeId () const |
| Returns the type id for this event instance.
|
|
virtual void | setTime (SbTime t) |
| Sets the time at which the event occurred.
|
|
SbTime | getTime () const |
| Gets the time at which the event occurred.
|
|
virtual void | setPosition (const SbVec2s &p) |
| Sets the window pixel location of the cursor when the event occurred.
|
|
virtual void | setPosition (const SbVec2f &p) |
| Float version of setPosition(const SbVec2s &p).
|
|
const SbVec2s & | getPosition () const |
| Returns the window pixel location of the cursor when the event occurred as integer values.
|
|
const SbVec2f & | getPositionFloat () const |
| Returns the window pixel location of the cursor when the event occurred as float values.
|
|
const SbVec2s & | getPosition (const SbViewportRegion &vpRgn) const |
| Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as integer values.
|
|
const SbVec2f & | getPositionFloat (const SbViewportRegion &vpRgn) const |
| Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as float values.
|
|
const SbVec2f & | getNormalizedPosition (const SbViewportRegion &vpRgn) const |
| Gets the normalized location of the cursor when the event occurred, relative to the specified viewport region.
|
|
void | setShiftDown (SbBool isDown) |
| Sets whether the shift key was down when the event occurred.
|
|
void | setCtrlDown (SbBool isDown) |
| Sets whether the CTRL key was down when the event occurred.
|
|
void | setAltDown (SbBool isDown) |
| Sets whether the ALT key was down when the event occurred.
|
|
void | setButton1Down (SbBool isDown) |
| Sets whether mouse Button 1 was down when the event occurred.
|
|
SbBool | wasShiftDown () const |
| Returns true if the shift key was down when the event occurred.
|
|
SbBool | wasCtrlDown () const |
| Returns true if the CTRL key was down when the event occurred.
|
|
SbBool | wasAltDown () const |
| Returns true if the ALT key was down when the event occurred.
|
|
SbBool | wasButton1Down () const |
| Returns true if mouse button 1 was down when the event occurred.
|
|
virtual const SbTrackerInfo * | getTrackerInfo () const |
| Gets whether an event object has associated tracker information.
|
|
SbTrackerInfo * | getTrackerInfo () |
| Gets whether an event object has associated tracker information.
|
|
SbBool | isOfType (const SoType &type) const |
| Returns TRUE if this object is of the type specified in type or is derived from that type.
|
|
template<typename TypedObjectClass > |
SbBool | isOfType () const |
| Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
|
|
Base class for all events.
SoEvent is the base class for events in the Open Inventor event model. An event typically represents a user action, such as a mouse button being pressed or a keyboard key being released. SoEvent contains general information found in all Open Inventor events, including the time the event occurred, the position of the locater when the event occurred, and the state of the modifier keys when the event occurred.
The virtual method SoEvent::getTrackerInfo() can be used to determine if an event object has associated 3D tracker information. Traditional 2D events like SoMouseButtonEvent and SoLocation2Event return NULL. 3D events like SoTrackerEvent and SoControllerButtonEvent return their associated tracker information (SbTrackerInfo).
Add an SoEventCallback node to the scene graph to handle Open Inventor events.
Events are delivered to the scene graph using an SoHandleEventAction.
The Open Inventor viewer classes automatically convert system events to Open Inventor event objects and send those event objects to the scene graph using an instance of SoSceneManager. SoSceneManager automatically creates and applies an SoHandleEventAction.
Similarly, the RemoteViz RenderArea class converts events coming from the RemoteViz client to Open Inventor event objects and sends those events to the scene graph using an instance of SoSceneManager.
Applications may create synthetic events and send them to the scene graph. Get the SoSceneManager object from the render area and call processEvent().
SEE ALSO
SoButtonEvent, SoControllerButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoSpaceballButtonEvent, SoTrackerEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice, SoWinRenderArea, SoTouchEvent, SoGestureEvent
Definition at line 116 of file SoEvent.h.