Click or drag to resize
SoEvent Class

Base class for all events.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.EventsSoEvent
      More...

Namespace: OIV.Inventor.Events
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 10.12.3.0 (10.12.3.0)
Syntax
public class SoEvent : SoNetBase

The SoEvent type exposes the following members.

Constructors
  NameDescription
Public methodSoEvent

Constructor.

Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetNormalizedPosition

Gets the normalized location of the cursor when the event occurred, relative to the specified viewport region.

Public methodGetPosition

Returns the window pixel location of the cursor when the event occurred as integer values.

Public methodGetPosition(SbViewportRegion)

Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as integer values.

Public methodGetPositionFloat

Returns the window pixel location of the cursor when the event occurred as float values.

Public methodGetPositionFloat(SbViewportRegion)

Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as float values.

Public methodGetTime

Gets the time at which the event occurred.

Public methodGetTrackerInfo

Gets whether an event object has associated tracker information.

Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetAltDown

Sets whether the ALT key was down when the event occurred.

Public methodSetButton1Down

Sets whether mouse Button 1 was down when the event occurred.

Public methodSetCtrlDown

Sets whether the CTRL key was down when the event occurred.

Public methodSetPosition(SbVec2f)
Public methodSetPosition(SbVec2s)

Sets the window pixel location of the cursor when the event occurred.

Public methodSetShiftDown

Sets whether the shift key was down when the event occurred.

Public methodSetTime

Sets the time at which the event occurred.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWasAltDown

Returns true if the ALT key was down when the event occurred.

Public methodWasButton1Down

Returns true if mouse button 1 was down when the event occurred.

Public methodWasCtrlDown

Returns true if the CTRL key was down when the event occurred.

Public methodWasShiftDown

Returns true if the shift key was down when the event occurred.

Top
Remarks

OIV.Inventor.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. OIV.Inventor.Events.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 OIV.Inventor.Events.SoEvent.GetTrackerInfo() can be used to determine if an event object has associated 3D tracker information. Traditional 2D events like OIV.Inventor.Events.SoMouseButtonEvent and OIV.Inventor.Events.SoLocation2Event return NULL. 3D events like OIV.Inventor.Events.SoTrackerEvent and OIV.Inventor.Events.SoControllerButtonEvent return their associated tracker information (OIV.Inventor.SbTrackerInfo).

Add an OIV.Inventor.Nodes.SoEventCallback node to the scene graph to handle Open Inventor events.

Events are delivered to the scene graph using an OIV.Inventor.Actions.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 OIV.Inventor.SoSceneManager. OIV.Inventor.SoSceneManager automatically creates and applies an OIV.Inventor.Actions.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 OIV.Inventor.SoSceneManager.

Applications may create synthetic events and send them to the scene graph. Get the OIV.Inventor.SoSceneManager object from the render area and call processEvent().

See Also
Inheritance Hierarchy