Click or drag to resize
SoControllerButtonEvent Class

Controller button press and release event.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.EventsSoEvent
      OIV.Inventor.EventsSoButtonEvent
        OIV.Inventor.EventsSoControllerButtonEvent

Namespace: OIV.Inventor.Events
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2023.1.3.0 (2023.1.3)
Syntax
public class SoControllerButtonEvent : SoButtonEvent

The SoControllerButtonEvent type exposes the following members.

Constructors
  NameDescription
Public methodSoControllerButtonEvent

Constructor.

Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetButton

Get which button generated the event.

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.

(Inherited from SoEvent.)
Public methodGetOrientation

Get orientation of associated tracker as a standard Open Inventor rotation (quaternion).

Public methodGetPosition

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

(Inherited from SoEvent.)
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.

(Inherited from SoEvent.)
Public methodGetPosition3

Get position of associated tracker in world coordinates.

Public methodGetPositionFloat

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

(Inherited from SoEvent.)
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.

(Inherited from SoEvent.)
Public methodGetRay

Get a ray for picking/intersecting.

Public methodGetState

Gets the state of the button.

(Inherited from SoButtonEvent.)
Public methodGetTime

Gets the time at which the event occurred.

(Inherited from SoEvent.)
Public methodGetTrackerInfo

Gets whether an event object has associated tracker information.

(Inherited from SoEvent.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsButtonPressEvent

Convenience function to see if an OIV.Inventor.Events.SoEvent is a press of the passed mouse button.

Public methodStatic memberIsButtonReleaseEvent

Convenience function to see if an OIV.Inventor.Events.SoEvent is a release of the passed mouse button.

Public methodSetAltDown

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

(Inherited from SoEvent.)
Public methodSetButton

Set which button generated the event.

Public methodSetButton1Down

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

(Inherited from SoEvent.)
Public methodSetCtrlDown

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

(Inherited from SoEvent.)
Public methodSetOrientation(SbRotation)

Set orientation value of associated tracker from an OIV.Inventor.SbRotation.

Public methodSetOrientation(SbVec3f, Single)

Set orientation value of associated tracker from axis and angle in radians.

Public methodSetOrientation(Single, Single, Single)

Set orientation value of associated tracker from Euler angles in radians (using the trackd convention Z*X*Y).

Public methodSetPosition(SbVec2f) (Inherited from SoEvent.)
Public methodSetPosition(SbVec2s)

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

(Inherited from SoEvent.)
Public methodSetPosition3

Set position of associated tracker in world coordinates.

Public methodSetShiftDown

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

(Inherited from SoEvent.)
Public methodSetState

Sets the state of the button.

(Inherited from SoButtonEvent.)
Public methodSetTime

Sets the time at which the event occurred.

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

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

(Inherited from SoEvent.)
Public methodWasButton1Down

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

(Inherited from SoEvent.)
Public methodWasCtrlDown

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

(Inherited from SoEvent.)
Public methodWasShiftDown

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

(Inherited from SoEvent.)
Top
Remarks

OIV.Inventor.Events.SoControllerButtonEvent represents controller button press and release events in the Open Inventor event model. A controller device generally has associated 3D tracker information.

A "tracker" is any device whose position and orientation are dynamically tracked in 3D, typically for immersive VR applications. For example: a head tracker. A "controller" is an input device which typically has buttons and/or valuators (e.g. a joystick). Many controllers have an associated tracker. For example, the commonly used "wand" input device has three buttons, a two-axis joystick (two valuators), and an associated tracker.

The virtual method OIV.Inventor.Events.SoEvent.GetTrackerInfo() can be used to determine if an event object has associated 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 a their associated tracker information (OIV.Inventor.SbTrackerInfo).

Many controller devices generate a continuous stream of data, so strictly speaking there are no "events". However Open Inventor classes that recognize the OIV.Inventor.Events.SoControllerButtonEvent interpret it as notification of a change in the button state (press or release). The application (or other software above Open Inventor) is responsible for deciding when to actually create an OIV.Inventor.Events.SoControllerButtonEvent.

See Also