Class PointerUtils
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public static class PointerUtils
Methods
GetPointer<T>(Handedness)
Find the first detected pointer of the given type with matching handedness.
Declaration
public static T GetPointer<T>(Handedness handedness)
where T : class, IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetPointer<T>(Handedness)
Find the first detected pointer of the given type with matching handedness.
Declaration
public static T GetPointer<T>(Handedness handedness)
where T : class, IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetPointerBehavior<T>(Handedness, InputSourceType)
Queries input system for the behavior of a given pointer type. See PointerBehavior.
Declaration
public static PointerBehavior GetPointerBehavior<T>(Handedness handedness, InputSourceType inputSourceType)
where T : class, IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness to query |
InputSourceType | inputSourceType |
Returns
Type | Description |
---|---|
PointerBehavior | PointerBehavior for the given pointer type and handedness |
Type Parameters
Name | Description |
---|---|
T | Type of pointer to query |
GetPointerBehavior<T>(Handedness, InputSourceType)
Queries input system for the behavior of a given pointer type. See PointerBehavior.
Declaration
public static PointerBehavior GetPointerBehavior<T>(Handedness handedness, InputSourceType inputSourceType)
where T : class, IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness to query |
InputSourceType | inputSourceType |
Returns
Type | Description |
---|---|
PointerBehavior | PointerBehavior for the given pointer type and handedness |
Type Parameters
Name | Description |
---|---|
T | Type of pointer to query |
GetPointers()
Iterate over all pointers in the input system. May contain duplicates.
Declaration
public static IEnumerable<IMixedRealityPointer> GetPointers()
Returns
Type | Description |
---|---|
IEnumerable<IMixedRealityPointer> |
GetPointers()
Iterate over all pointers in the input system. May contain duplicates.
Declaration
public static IEnumerable<IMixedRealityPointer> GetPointers()
Returns
Type | Description |
---|---|
IEnumerable<IMixedRealityPointer> |
GetPointers<T>(Handedness)
Returns iterator over all pointers of specific type, with specific handedness.
Declaration
public static IEnumerable<T> GetPointers<T>(Handedness handedness = null)
where T : IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of pointer |
Returns
Type | Description |
---|---|
IEnumerable<T> | Iterator over all pointers of specific type, with specific handedness |
Type Parameters
Name | Description |
---|---|
T | Return only pointers with this input type |
GetPointers<T>(Handedness)
Returns iterator over all pointers of specific type, with specific handedness.
Declaration
public static IEnumerable<T> GetPointers<T>(Handedness handedness = null)
where T : IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of pointer |
Returns
Type | Description |
---|---|
IEnumerable<T> | Iterator over all pointers of specific type, with specific handedness |
Type Parameters
Name | Description |
---|---|
T | Return only pointers with this input type |
GetPointers<T>(Handedness, InputSourceType)
Returns all pointers with given handedness and input type.
Declaration
public static IEnumerable<T> GetPointers<T>(Handedness handedness, InputSourceType sourceType)
where T : IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of pointer |
InputSourceType | sourceType | Only return pointers of this input source type |
Returns
Type | Description |
---|---|
IEnumerable<T> | Iterator over all pointers that match the source type, with specific handedness |
Type Parameters
Name | Description |
---|---|
T |
GetPointers<T>(Handedness, InputSourceType)
Returns all pointers with given handedness and input type.
Declaration
public static IEnumerable<T> GetPointers<T>(Handedness handedness, InputSourceType sourceType)
where T : IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of pointer |
InputSourceType | sourceType | Only return pointers of this input source type |
Returns
Type | Description |
---|---|
IEnumerable<T> | Iterator over all pointers that match the source type, with specific handedness |
Type Parameters
Name | Description |
---|---|
T |
SetGazePointerBehavior(PointerBehavior)
Sets the behavior for the gaze pointer.
Declaration
public static void SetGazePointerBehavior(PointerBehavior pointerBehavior)
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
SetGazePointerBehavior(PointerBehavior)
Sets the behavior for the gaze pointer.
Declaration
public static void SetGazePointerBehavior(PointerBehavior pointerBehavior)
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
SetHandGrabPointerBehavior(PointerBehavior, Handedness)
Sets the behavior for the grab pointer with given handedness.
Declaration
public static void SetHandGrabPointerBehavior(PointerBehavior pointerBehavior, Handedness handedness = null)
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
Handedness | handedness | Specify handedness to restrict to only right, left. |
SetHandGrabPointerBehavior(PointerBehavior, Handedness)
Sets the behavior for the grab pointer with given handedness.
Declaration
public static void SetHandGrabPointerBehavior(PointerBehavior pointerBehavior, Handedness handedness = null)
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
Handedness | handedness | Specify handedness to restrict to only right, left. |
SetHandPokePointerBehavior(PointerBehavior, Handedness)
Sets the behavior for the poke pointer with given handedness.
Declaration
public static void SetHandPokePointerBehavior(PointerBehavior pointerBehavior, Handedness handedness = null)
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
Handedness | handedness | Specify handedness to restrict to only right, left. |
SetHandPokePointerBehavior(PointerBehavior, Handedness)
Sets the behavior for the poke pointer with given handedness.
Declaration
public static void SetHandPokePointerBehavior(PointerBehavior pointerBehavior, Handedness handedness = null)
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
Handedness | handedness | Specify handedness to restrict to only right, left. |
SetHandRayPointerBehavior(PointerBehavior, Handedness)
Sets the behavior for the hand ray with given handedness
Declaration
public static void SetHandRayPointerBehavior(PointerBehavior pointerBehavior, Handedness handedness = null)
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
Handedness | handedness | Specify handedness to restrict to only right, left hands. |
SetHandRayPointerBehavior(PointerBehavior, Handedness)
Sets the behavior for the hand ray with given handedness
Declaration
public static void SetHandRayPointerBehavior(PointerBehavior pointerBehavior, Handedness handedness = null)
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
Handedness | handedness | Specify handedness to restrict to only right, left hands. |
SetMotionControllerRayPointerBehavior(PointerBehavior, Handedness)
Sets the behavior for the motion controller ray with given handedness
Declaration
public static void SetMotionControllerRayPointerBehavior(PointerBehavior pointerBehavior, Handedness handedness = null)
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
Handedness | handedness | Specify handedness to restrict to only right, left. |
SetMotionControllerRayPointerBehavior(PointerBehavior, Handedness)
Sets the behavior for the motion controller ray with given handedness
Declaration
public static void SetMotionControllerRayPointerBehavior(PointerBehavior pointerBehavior, Handedness handedness = null)
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
Handedness | handedness | Specify handedness to restrict to only right, left. |
SetPointerBehavior<T>(PointerBehavior, Handedness)
Sets the pointer behavior for pointer of type T, for all input types.
Declaration
public static void SetPointerBehavior<T>(PointerBehavior pointerBehavior, Handedness handedness = null)
where T : class, IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
Handedness | handedness | Specify handedness to restrict to only right, left. |
Type Parameters
Name | Description |
---|---|
T | All pointer types that equal or derive from this type will be set. |
SetPointerBehavior<T>(PointerBehavior, Handedness)
Sets the pointer behavior for pointer of type T, for all input types.
Declaration
public static void SetPointerBehavior<T>(PointerBehavior pointerBehavior, Handedness handedness = null)
where T : class, IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
Handedness | handedness | Specify handedness to restrict to only right, left. |
Type Parameters
Name | Description |
---|---|
T | All pointer types that equal or derive from this type will be set. |
SetPointerBehavior<T>(PointerBehavior, InputSourceType, Handedness)
Sets the behavior for the given pointer type and input type.
Declaration
public static void SetPointerBehavior<T>(PointerBehavior pointerBehavior, InputSourceType sourceType, Handedness handedness = null)
where T : class, IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
InputSourceType | sourceType | Allows setting different behaviors for different input types (hands, controllers, etc.) |
Handedness | handedness | Specify handedness to restrict to only right, left. |
Type Parameters
Name | Description |
---|---|
T | All pointer types that equal or derive from this type will be set. |
SetPointerBehavior<T>(PointerBehavior, InputSourceType, Handedness)
Sets the behavior for the given pointer type and input type.
Declaration
public static void SetPointerBehavior<T>(PointerBehavior pointerBehavior, InputSourceType sourceType, Handedness handedness = null)
where T : class, IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
PointerBehavior | pointerBehavior | Desired PointerBehavior. |
InputSourceType | sourceType | Allows setting different behaviors for different input types (hands, controllers, etc.) |
Handedness | handedness | Specify handedness to restrict to only right, left. |
Type Parameters
Name | Description |
---|---|
T | All pointer types that equal or derive from this type will be set. |
TryGetHandRayEndPoint(Handedness, out Vector3)
Tries to get the end point of a hand ray. If no hand ray of given handedness is found, returns false and sets result to zero.
Declaration
public static bool TryGetHandRayEndPoint(Handedness handedness, out Vector3 endPoint)
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of ray |
Vector3 | endPoint | The output position |
Returns
Type | Description |
---|---|
Boolean | True if pointer found, false otherwise. If not found, endPoint is set to zero |
TryGetHandRayEndPoint(Handedness, out Vector3)
Tries to get the end point of a hand ray. If no hand ray of given handedness is found, returns false and sets result to zero.
Declaration
public static bool TryGetHandRayEndPoint(Handedness handedness, out Vector3 endPoint)
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of ray |
Vector3 | endPoint | The output position |
Returns
Type | Description |
---|---|
Boolean | True if pointer found, false otherwise. If not found, endPoint is set to zero |
TryGetMotionControllerEndPoint(Handedness, out Vector3)
Tries to get the end point of a motion controller. If no pointer of given handedness is found, returns false and sets result to zero.
Declaration
public static bool TryGetMotionControllerEndPoint(Handedness handedness, out Vector3 endPoint)
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of ray |
Vector3 | endPoint | The output position |
Returns
Type | Description |
---|---|
Boolean | True if pointer found, false otherwise. If not found, endPoint is set to zero |
TryGetMotionControllerEndPoint(Handedness, out Vector3)
Tries to get the end point of a motion controller. If no pointer of given handedness is found, returns false and sets result to zero.
Declaration
public static bool TryGetMotionControllerEndPoint(Handedness handedness, out Vector3 endPoint)
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of ray |
Vector3 | endPoint | The output position |
Returns
Type | Description |
---|---|
Boolean | True if pointer found, false otherwise. If not found, endPoint is set to zero |
TryGetPointerEndpoint<T>(Handedness, InputSourceType, out Vector3)
Tries to get the end point of a pointer by source type and handedness. If no pointer of given handedness is found, returns false and sets result to zero.
Declaration
public static bool TryGetPointerEndpoint<T>(Handedness handedness, InputSourceType inputType, out Vector3 endPoint)
where T : IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of pointer |
InputSourceType | inputType | Input type of pointer |
Vector3 | endPoint | Output point position |
Returns
Type | Description |
---|---|
Boolean | True if pointer found, false otherwise. If not found, endPoint is set to zero |
Type Parameters
Name | Description |
---|---|
T | Type of pointer to query |
TryGetPointerEndpoint<T>(Handedness, InputSourceType, out Vector3)
Tries to get the end point of a pointer by source type and handedness. If no pointer of given handedness is found, returns false and sets result to zero.
Declaration
public static bool TryGetPointerEndpoint<T>(Handedness handedness, InputSourceType inputType, out Vector3 endPoint)
where T : IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of pointer |
InputSourceType | inputType | Input type of pointer |
Vector3 | endPoint | Output point position |
Returns
Type | Description |
---|---|
Boolean | True if pointer found, false otherwise. If not found, endPoint is set to zero |
Type Parameters
Name | Description |
---|---|
T | Type of pointer to query |
TryGetPointerEndpoint<T>(Handedness, out Vector3)
Tries to get the end point of a pointer of a pointer type and handedness. If no pointer of given handedness is found, returns false and sets result to zero.
Declaration
public static bool TryGetPointerEndpoint<T>(Handedness handedness, out Vector3 endPoint)
where T : class, IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of pointer |
Vector3 | endPoint | The output point position |
Returns
Type | Description |
---|---|
Boolean | True if pointer found, false otherwise. If not found, endPoint is set to zero |
Type Parameters
Name | Description |
---|---|
T | Type of pointer to query |
TryGetPointerEndpoint<T>(Handedness, out Vector3)
Tries to get the end point of a pointer of a pointer type and handedness. If no pointer of given handedness is found, returns false and sets result to zero.
Declaration
public static bool TryGetPointerEndpoint<T>(Handedness handedness, out Vector3 endPoint)
where T : class, IMixedRealityPointer
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Handedness of pointer |
Vector3 | endPoint | The output point position |
Returns
Type | Description |
---|---|
Boolean | True if pointer found, false otherwise. If not found, endPoint is set to zero |
Type Parameters
Name | Description |
---|---|
T | Type of pointer to query |