Class XRSpatialInputManager
Handles all the input events.
Inherited Members
Namespace: Evergine.Framework.XR.Interaction
Assembly: Evergine.Framework.dll
Syntax
public abstract class XRSpatialInputManager : DisposableObject
Constructors
XRSpatialInputManager(XRPlatform)
Initializes a new instance of the XRSpatialInputManager class.
Declaration
public XRSpatialInputManager(XRPlatform platform)
Parameters
Type | Name | Description |
---|---|---|
XRPlatform | platform | The XR platform. |
Fields
currentSpatialState
An instance of the current SpatialState.
Declaration
protected SpatialState currentSpatialState
Field Value
Type | Description |
---|---|
SpatialState |
Properties
EnabledGestures
Gets or sets the enabled gestures.
Declaration
public abstract SpatialGestures EnabledGestures { get; set; }
Property Value
Type | Description |
---|---|
SpatialGestures |
GenericControllersArray
Gets the array of controllers.
Declaration
public XRControllerGenericState[] GenericControllersArray { get; }
Property Value
Type | Description |
---|---|
XRControllerGenericState[] |
SpatialState
Gets the current spatial state.
Declaration
public SpatialState SpatialState { get; }
Property Value
Type | Description |
---|---|
SpatialState |
Methods
FireHoldCanceledEvent(SpatialSource)
Fires when Hold is canceled.
Declaration
protected void FireHoldCanceledEvent(SpatialSource spatialSource)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | spatialSource | The spatial source. |
FireHoldCompletedEvent(SpatialSource)
Fires the HoldCompleted event.
Declaration
protected void FireHoldCompletedEvent(SpatialSource spatialSource)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | spatialSource | The spatial source. |
FireHoldStartedEvent(SpatialSource)
Fires the Hold started event.
Declaration
protected void FireHoldStartedEvent(SpatialSource spatialSource)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | spatialSource | The spatial source. |
FireManipulationCanceledEvent(SpatialSource)
Fire manipulation canceled.
Declaration
protected void FireManipulationCanceledEvent(SpatialSource spatialSource)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | spatialSource | The spatial source. |
FireManipulationCompletedEvent(SpatialSource, Vector3)
Fire manipulation completed.
Declaration
protected void FireManipulationCompletedEvent(SpatialSource spatialSource, Vector3 cumulativeDelta)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | spatialSource | The spatial source. |
Vector3 | cumulativeDelta | The cumulative delta. |
FireManipulationStartedEvent(SpatialSource)
Fire manipulation started.
Declaration
protected void FireManipulationStartedEvent(SpatialSource spatialSource)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | spatialSource | The spatial source. |
FireManipulationUpdatedEvent(SpatialSource, Vector3)
Fires when manipulation is updated.
Declaration
protected void FireManipulationUpdatedEvent(SpatialSource spatialSource, Vector3 cumulativeDelta)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | spatialSource | The spatial source. |
Vector3 | cumulativeDelta | The cumulative delta. |
FireNavigationCanceledEvent(SpatialSource)
Fires when navigation is canceled.
Declaration
protected void FireNavigationCanceledEvent(SpatialSource spatialSource)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | spatialSource | The spatial source. |
FireNavigationCompletedEvent(SpatialSource, Vector3)
Fires when navigation is completed.
Declaration
protected void FireNavigationCompletedEvent(SpatialSource spatialSource, Vector3 normalizedOffset)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | spatialSource | The spatial source. |
Vector3 | normalizedOffset | The normalized offset. |
FireNavigationStartedEvent(SpatialSource, bool, bool, bool)
The navigation gesture has started.
Declaration
protected void FireNavigationStartedEvent(SpatialSource source, bool isNavigatingX, bool isNavigatingY, bool isNavigatingZ)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | source | The source of the event. |
bool | isNavigatingX | Navigating on the X axis. |
bool | isNavigatingY | Navigating on the Y axis. |
bool | isNavigatingZ | Navigating on the Z axis. |
FireNavigationUpdatedEvent(SpatialSource, Vector3)
Fires when navigation is updated.
Declaration
protected void FireNavigationUpdatedEvent(SpatialSource spatialSource, Vector3 normalizedOffset)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | spatialSource | The spatial source. |
Vector3 | normalizedOffset | The normalized offset. |
FireRecognitionEndedEvent(SpatialSource)
The recognition gesture has ended.
Declaration
protected void FireRecognitionEndedEvent(SpatialSource source)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | source | The source of the event. |
FireRecognitionStartedEvent(SpatialSource)
The recognition gesture has started.
Declaration
protected void FireRecognitionStartedEvent(SpatialSource source)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | source | The source of the event. |
FireSourceDetectedEvent()
Fires the SourceDetected event.
Declaration
protected void FireSourceDetectedEvent()
FireSourceLostEvent()
Fires the SourceLost event.
Declaration
protected void FireSourceLostEvent()
FireSourcePressedEvent()
Fires the Source pressed event.
Declaration
protected void FireSourcePressedEvent()
FireSourceReleasedEvent()
Fires the SourceReleased event.
Declaration
protected void FireSourceReleasedEvent()
FireSourceUpdatedEvent()
Fires the SourceUpdated event.
Declaration
protected void FireSourceUpdatedEvent()
FireTappedEvent(SpatialSource, int)
Fires a tap event.
Declaration
protected void FireTappedEvent(SpatialSource source, int tapCount)
Parameters
Type | Name | Description |
---|---|---|
SpatialSource | source | The source of the event. |
int | tapCount | The number of consecutive taps. |
Initialize()
Initializes all resources used by this instance.
Declaration
public abstract void Initialize()
Events
HoldCanceledEvent
The hold gesture is cancelled.
Declaration
public event XRSpatialInputManager.HoldCanceledEventDelegate HoldCanceledEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.HoldCanceledEventDelegate |
HoldCompletedEvent
The hold gesture has been completed
Declaration
public event XRSpatialInputManager.HoldCompletedEventDelegate HoldCompletedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.HoldCompletedEventDelegate |
HoldStartedEvent
The hold gesture has started
Declaration
public event XRSpatialInputManager.HoldStartedEventDelegate HoldStartedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.HoldStartedEventDelegate |
ManipulationCanceledEvent
The manipulation gesture is canceled.
Declaration
public event XRSpatialInputManager.ManipulationCanceledEventDelegate ManipulationCanceledEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.ManipulationCanceledEventDelegate |
ManipulationCompletedEvent
The manipulation gesture is complete
Declaration
public event XRSpatialInputManager.ManipulationCompletedEventDelegate ManipulationCompletedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.ManipulationCompletedEventDelegate |
ManipulationStartedEvent
The manipulation gesture has started
Declaration
public event XRSpatialInputManager.ManipulationStartedEventDelegate ManipulationStartedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.ManipulationStartedEventDelegate |
ManipulationUpdatedEvent
The manipulation gesture is updated.
Declaration
public event XRSpatialInputManager.ManipulationUpdatedEventDelegate ManipulationUpdatedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.ManipulationUpdatedEventDelegate |
NavigationCanceledEvent
The navigation gesture is cancelled.
Declaration
public event XRSpatialInputManager.NavigationCanceledEventDelegate NavigationCanceledEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.NavigationCanceledEventDelegate |
NavigationCompletedEvent
The navigation gesture is complete.
Declaration
public event XRSpatialInputManager.NavigationCompletedEventDelegate NavigationCompletedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.NavigationCompletedEventDelegate |
NavigationStartedEvent
The navigation gesture has started
Declaration
public event XRSpatialInputManager.NavigationStartedEventDelegate NavigationStartedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.NavigationStartedEventDelegate |
NavigationUpdatedEvent
The navigation gesture gets updated.
Declaration
public event XRSpatialInputManager.NavigationUpdatedEventDelegate NavigationUpdatedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.NavigationUpdatedEventDelegate |
RecognitionEndedEvent
The recognition gesture has ended
Declaration
public event XRSpatialInputManager.RecognitionEndedEventDelegate RecognitionEndedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.RecognitionEndedEventDelegate |
RecognitionStartedEvent
The recognition gesture has started
Declaration
public event XRSpatialInputManager.RecognitionStartedEventDelegate RecognitionStartedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.RecognitionStartedEventDelegate |
SourceDetected
Occurs when a new hand, controller, or source of voice commands is detected.
Declaration
public event XRSpatialInputManager.InputSourceDelegate SourceDetected
Event Type
Type | Description |
---|---|
XRSpatialInputManager.InputSourceDelegate |
SourceLost
Occurs when a hand, controller, or source of voice commands is no longer available.
Declaration
public event XRSpatialInputManager.InputSourceDelegate SourceLost
Event Type
Type | Description |
---|---|
XRSpatialInputManager.InputSourceDelegate |
SourcePressed
Occurs when a hand or controller enters the pressed state.
Declaration
public event XRSpatialInputManager.InputSourceDelegate SourcePressed
Event Type
Type | Description |
---|---|
XRSpatialInputManager.InputSourceDelegate |
SourceReleased
Occurs when a hand or controller exits the pressed state.
Declaration
public event XRSpatialInputManager.InputSourceDelegate SourceReleased
Event Type
Type | Description |
---|---|
XRSpatialInputManager.InputSourceDelegate |
SourceUpdated
Occurs when a hand or controller experiences a change to its SpatialInteractionSourceState.
Declaration
public event XRSpatialInputManager.InputSourceDelegate SourceUpdated
Event Type
Type | Description |
---|---|
XRSpatialInputManager.InputSourceDelegate |
TappedEvent
Occurs when there is a tap gesture.
Declaration
public event XRSpatialInputManager.TappedEventDelegate TappedEvent
Event Type
Type | Description |
---|---|
XRSpatialInputManager.TappedEventDelegate |