Interface IMixedRealityNearPointer
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public interface IMixedRealityNearPointer : IMixedRealityPointer, IEqualityComparer
Properties
IsNearObject
Returns true if the hand is near anything that's grabbable Currently performs a sphere cast in the direction of the hand ray. Currently anything that has a collider is considered "Grabbable" Eventually we need to filter based on things that can respond to grab events.
Declaration
bool IsNearObject { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsNearObject
Returns true if the hand is near anything that's grabbable Currently performs a sphere cast in the direction of the hand ray. Currently anything that has a collider is considered "Grabbable" Eventually we need to filter based on things that can respond to grab events.
Declaration
bool IsNearObject { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
TryGetDistanceToNearestSurface(out Single)
Near pointers often interact with surfaces.
This method provides a mechanism to get the distance to the closest surface the near pointer is interacting with.
Declaration
bool TryGetDistanceToNearestSurface(out float distance)
Parameters
Type | Name | Description |
---|---|---|
Single | distance | Out parameter filled with the distance along the surface normal from the surface to the pointer if available, otherwise 0.0f. |
Returns
Type | Description |
---|---|
Boolean | True if a distance was retrieved, false if not. |
TryGetDistanceToNearestSurface(out Single)
Near pointers often interact with surfaces.
This method provides a mechanism to get the distance to the closest surface the near pointer is interacting with.
Declaration
bool TryGetDistanceToNearestSurface(out float distance)
Parameters
Type | Name | Description |
---|---|---|
Single | distance | Out parameter filled with the distance along the surface normal from the surface to the pointer if available, otherwise 0.0f. |
Returns
Type | Description |
---|---|
Boolean | True if a distance was retrieved, false if not. |
TryGetNearGraspPoint(out Vector3)
For near pointer we may want to draw a tether between the pointer and the object.
The visual grasp point (average of index and thumb) may actually be different from the pointer position (the palm).
This method provides a mechanism to get the visual grasp point.
NOTE: Not all near pointers have a grasp point (for example a poke pointer).
Declaration
bool TryGetNearGraspPoint(out Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position |
Returns
Type | Description |
---|---|
Boolean | True if a grasp point was retrieved, false if not. |
TryGetNearGraspPoint(out Vector3)
For near pointer we may want to draw a tether between the pointer and the object.
The visual grasp point (average of index and thumb) may actually be different from the pointer position (the palm).
This method provides a mechanism to get the visual grasp point.
NOTE: Not all near pointers have a grasp point (for example a poke pointer).
Declaration
bool TryGetNearGraspPoint(out Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position |
Returns
Type | Description |
---|---|
Boolean | True if a grasp point was retrieved, false if not. |
TryGetNormalToNearestSurface(out Vector3)
Near pointers often interact with surfaces.
This method provides a mechanism to get the normal of the closest surface the near pointer is interacting with.
Declaration
bool TryGetNormalToNearestSurface(out Vector3 normal)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | normal | Out parameter filled with the surface normal if available, otherwise Vector3.zero. |
Returns
Type | Description |
---|---|
Boolean | True if a normal was retrieved, false if not. |
TryGetNormalToNearestSurface(out Vector3)
Near pointers often interact with surfaces.
This method provides a mechanism to get the normal of the closest surface the near pointer is interacting with.
Declaration
bool TryGetNormalToNearestSurface(out Vector3 normal)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | normal | Out parameter filled with the surface normal if available, otherwise Vector3.zero. |
Returns
Type | Description |
---|---|
Boolean | True if a normal was retrieved, false if not. |