mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Interface IMixedRealityNearPointer

    Inherited Members
    IMixedRealityPointer.Controller
    IMixedRealityPointer.PointerId
    IMixedRealityPointer.PointerName
    IMixedRealityPointer.InputSourceParent
    IMixedRealityPointer.BaseCursor
    IMixedRealityPointer.CursorModifier
    IMixedRealityPointer.IsInteractionEnabled
    IMixedRealityPointer.IsActive
    IMixedRealityPointer.IsFocusLocked
    IMixedRealityPointer.IsTargetPositionLockedOnFocusLock
    IMixedRealityPointer.Rays
    IMixedRealityPointer.PrioritizedLayerMasksOverride
    IMixedRealityPointer.FocusTarget
    IMixedRealityPointer.Result
    IMixedRealityPointer.SceneQueryType
    IMixedRealityPointer.SphereCastRadius
    IMixedRealityPointer.Position
    IMixedRealityPointer.Rotation
    IMixedRealityPointer.OnPreSceneQuery()
    IMixedRealityPointer.OnPostSceneQuery()
    IMixedRealityPointer.OnPreCurrentPointerTargetChange()
    IMixedRealityPointer.Reset()
    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.

    In This Article
    • Properties
      • IsNearObject
      • IsNearObject
    • Methods
      • TryGetDistanceToNearestSurface(out Single)
      • TryGetDistanceToNearestSurface(out Single)
      • TryGetNearGraspPoint(out Vector3)
      • TryGetNearGraspPoint(out Vector3)
      • TryGetNormalToNearestSurface(out Vector3)
      • TryGetNormalToNearestSurface(out Vector3)
    Back to top Generated by DocFX