Interface IMixedRealityFocusProvider
Implements the Focus Provider for handling focus of pointers.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public interface IMixedRealityFocusProvider : IMixedRealityService, IDisposable, IMixedRealitySourceStateHandler, IMixedRealitySpeechHandler, IMixedRealityBaseInputHandler, IEventSystemHandler
Properties
FocusLayerMasks
The layer masks for the focus pointers to raycast against.
Declaration
LayerMask[] FocusLayerMasks { get; }
Property Value
Type | Description |
---|---|
LayerMask[] |
FocusLayerMasks
The layer masks for the focus pointers to raycast against.
Declaration
LayerMask[] FocusLayerMasks { get; }
Property Value
Type | Description |
---|---|
LayerMask[] |
GlobalPointingExtent
Maximum distance at which all pointers can collide with a GameObject, unless it has an override extent.
Declaration
float GlobalPointingExtent { get; }
Property Value
Type | Description |
---|---|
Single |
GlobalPointingExtent
Maximum distance at which all pointers can collide with a GameObject, unless it has an override extent.
Declaration
float GlobalPointingExtent { get; }
Property Value
Type | Description |
---|---|
Single |
PrimaryPointer
Current primary pointer. Determined by the primary pointer selector in use (see MixedRealityPointerProfile.PrimaryPointerSelector).
Declaration
IMixedRealityPointer PrimaryPointer { get; }
Property Value
Type | Description |
---|---|
IMixedRealityPointer |
PrimaryPointer
Current primary pointer. Determined by the primary pointer selector in use (see MixedRealityPointerProfile.PrimaryPointerSelector).
Declaration
IMixedRealityPointer PrimaryPointer { get; }
Property Value
Type | Description |
---|---|
IMixedRealityPointer |
UIRaycastCamera
The Camera the EventSystem uses to raycast against.
Declaration
Camera UIRaycastCamera { get; }
Property Value
Type | Description |
---|---|
Camera |
Remarks
Every uGUI canvas in your scene should use this camera as its event camera.
UIRaycastCamera
The Camera the EventSystem uses to raycast against.
Declaration
Camera UIRaycastCamera { get; }
Property Value
Type | Description |
---|---|
Camera |
Remarks
Every uGUI canvas in your scene should use this camera as its event camera.
Methods
GenerateNewPointerId()
Generate a new unique pointer id.
Declaration
uint GenerateNewPointerId()
Returns
Type | Description |
---|---|
UInt32 |
GenerateNewPointerId()
Generate a new unique pointer id.
Declaration
uint GenerateNewPointerId()
Returns
Type | Description |
---|---|
UInt32 |
GetFocusedObject(IMixedRealityPointer)
Gets the currently focused object for the pointing source.
Declaration
GameObject GetFocusedObject(IMixedRealityPointer pointingSource)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointingSource |
Returns
Type | Description |
---|---|
GameObject | Currently Focused Object. |
Remarks
If the pointing source is not registered, then the Gaze's Focused GameObject is returned.
GetFocusedObject(IMixedRealityPointer)
Gets the currently focused object for the pointing source.
Declaration
GameObject GetFocusedObject(IMixedRealityPointer pointingSource)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointingSource |
Returns
Type | Description |
---|---|
GameObject | Currently Focused Object. |
Remarks
If the pointing source is not registered, then the Gaze's Focused GameObject is returned.
GetPointers<T>()
Provides access to all registered pointers of a specified type.
Declaration
IEnumerable<T> GetPointers<T>()
where T : class, IMixedRealityPointer
Returns
Type | Description |
---|---|
IEnumerable<T> |
Type Parameters
Name | Description |
---|---|
T | The type of pointers to request. Use IMixedRealityPointer to access all pointers. |
GetPointers<T>()
Provides access to all registered pointers of a specified type.
Declaration
IEnumerable<T> GetPointers<T>()
where T : class, IMixedRealityPointer
Returns
Type | Description |
---|---|
IEnumerable<T> |
Type Parameters
Name | Description |
---|---|
T | The type of pointers to request. Use IMixedRealityPointer to access all pointers. |
IsPointerRegistered(IMixedRealityPointer)
Checks if the pointer is registered with the Focus Manager.
Declaration
bool IsPointerRegistered(IMixedRealityPointer pointer)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer |
Returns
Type | Description |
---|---|
Boolean | True, if registered, otherwise false. |
IsPointerRegistered(IMixedRealityPointer)
Checks if the pointer is registered with the Focus Manager.
Declaration
bool IsPointerRegistered(IMixedRealityPointer pointer)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer |
Returns
Type | Description |
---|---|
Boolean | True, if registered, otherwise false. |
RegisterPointer(IMixedRealityPointer)
Registers the pointer with the Focus Manager.
Declaration
bool RegisterPointer(IMixedRealityPointer pointer)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer |
Returns
Type | Description |
---|---|
Boolean | True, if the pointer was registered, false if the pointer was previously registered. |
RegisterPointer(IMixedRealityPointer)
Registers the pointer with the Focus Manager.
Declaration
bool RegisterPointer(IMixedRealityPointer pointer)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer |
Returns
Type | Description |
---|---|
Boolean | True, if the pointer was registered, false if the pointer was previously registered. |
SubscribeToPrimaryPointerChanged(PrimaryPointerChangedHandler, Boolean)
Subscribes to primary pointer changes.
Declaration
void SubscribeToPrimaryPointerChanged(PrimaryPointerChangedHandler handler, bool invokeHandlerWithCurrentPointer)
Parameters
Type | Name | Description |
---|---|---|
PrimaryPointerChangedHandler | handler | Handler to be called when the primary pointer changes |
Boolean | invokeHandlerWithCurrentPointer | When true, the passed in handler will be invoked immediately with the current primary pointer before subscribing. This is useful to avoid having to manually poll the current value. |
SubscribeToPrimaryPointerChanged(PrimaryPointerChangedHandler, Boolean)
Subscribes to primary pointer changes.
Declaration
void SubscribeToPrimaryPointerChanged(PrimaryPointerChangedHandler handler, bool invokeHandlerWithCurrentPointer)
Parameters
Type | Name | Description |
---|---|---|
PrimaryPointerChangedHandler | handler | Handler to be called when the primary pointer changes |
Boolean | invokeHandlerWithCurrentPointer | When true, the passed in handler will be invoked immediately with the current primary pointer before subscribing. This is useful to avoid having to manually poll the current value. |
TryGetFocusDetails(IMixedRealityPointer, out FocusDetails)
Gets the currently focused object for the pointing source.
Declaration
bool TryGetFocusDetails(IMixedRealityPointer pointer, out FocusDetails focusDetails)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer | |
FocusDetails | focusDetails |
Returns
Type | Description |
---|---|
Boolean |
TryGetFocusDetails(IMixedRealityPointer, out FocusDetails)
Gets the currently focused object for the pointing source.
Declaration
bool TryGetFocusDetails(IMixedRealityPointer pointer, out FocusDetails focusDetails)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer | |
FocusDetails | focusDetails |
Returns
Type | Description |
---|---|
Boolean |
TryOverrideFocusDetails(IMixedRealityPointer, FocusDetails)
Sets the FocusDetails of the specified pointer, overriding the focus point that was currently set. This can be used to change the FocusDetails of a specific pointer even if focus is locked.
Declaration
bool TryOverrideFocusDetails(IMixedRealityPointer pointer, FocusDetails focusDetails)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer | |
FocusDetails | focusDetails |
Returns
Type | Description |
---|---|
Boolean | True if the FocusDetails were set successfully. False if the pointer is not associated with the FocusProvider. |
TryOverrideFocusDetails(IMixedRealityPointer, FocusDetails)
Sets the FocusDetails of the specified pointer, overriding the focus point that was currently set. This can be used to change the FocusDetails of a specific pointer even if focus is locked.
Declaration
bool TryOverrideFocusDetails(IMixedRealityPointer pointer, FocusDetails focusDetails)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer | |
FocusDetails | focusDetails |
Returns
Type | Description |
---|---|
Boolean | True if the FocusDetails were set successfully. False if the pointer is not associated with the FocusProvider. |
UnregisterPointer(IMixedRealityPointer)
Unregisters the pointer with the Focus Manager.
Declaration
bool UnregisterPointer(IMixedRealityPointer pointer)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer |
Returns
Type | Description |
---|---|
Boolean | True, if the pointer was unregistered, false if the pointer was not registered. |
UnregisterPointer(IMixedRealityPointer)
Unregisters the pointer with the Focus Manager.
Declaration
bool UnregisterPointer(IMixedRealityPointer pointer)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityPointer | pointer |
Returns
Type | Description |
---|---|
Boolean | True, if the pointer was unregistered, false if the pointer was not registered. |
UnsubscribeFromPrimaryPointerChanged(PrimaryPointerChangedHandler)
Unsubscribes from primary pointer changes.
Declaration
void UnsubscribeFromPrimaryPointerChanged(PrimaryPointerChangedHandler handler)
Parameters
Type | Name | Description |
---|---|---|
PrimaryPointerChangedHandler | handler | Handler to unsubscribe |
UnsubscribeFromPrimaryPointerChanged(PrimaryPointerChangedHandler)
Unsubscribes from primary pointer changes.
Declaration
void UnsubscribeFromPrimaryPointerChanged(PrimaryPointerChangedHandler handler)
Parameters
Type | Name | Description |
---|---|---|
PrimaryPointerChangedHandler | handler | Handler to unsubscribe |