mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class PokePointer

    A near interaction pointer that generates touch events based on touchables in close proximity.

    Inheritance
    Object
    InputSystemGlobalHandlerListener
    ControllerPoseSynchronizer
    BaseControllerPointer
    PokePointer
    Implements
    MonoBehaviour
    IMixedRealityControllerPoseSynchronizer
    IMixedRealitySourcePoseHandler
    IMixedRealitySourceStateHandler
    IMixedRealityInputHandler
    IMixedRealityBaseInputHandler
    IMixedRealityInputHandler<Single>
    IMixedRealityInputHandler<Vector2>
    IMixedRealityInputHandler<Vector3>
    IMixedRealityInputHandler<Quaternion>
    IMixedRealityInputHandler<MixedRealityPose>
    IEventSystemHandler
    IMixedRealityNearPointer
    IMixedRealityPointer
    IEqualityComparer
    Inherited Members
    BaseControllerPointer.DisableCursorOnStart
    BaseControllerPointer.raycastOrigin
    BaseControllerPointer.pointerAction
    BaseControllerPointer.IsSelectPressed
    BaseControllerPointer.HasSelectPressedOnce
    BaseControllerPointer.IsHoldPressed
    BaseControllerPointer.SetCursor(GameObject)
    BaseControllerPointer.Start()
    BaseControllerPointer.OnDisable()
    BaseControllerPointer.Controller
    BaseControllerPointer.PointerId
    BaseControllerPointer.PointerName
    BaseControllerPointer.InputSourceParent
    BaseControllerPointer.BaseCursor
    BaseControllerPointer.CursorModifier
    BaseControllerPointer.IsActive
    BaseControllerPointer.IsFocusLocked
    BaseControllerPointer.IsTargetPositionLockedOnFocusLock
    BaseControllerPointer.PointerExtent
    BaseControllerPointer.DefaultPointerExtent
    BaseControllerPointer.Rays
    BaseControllerPointer.PrioritizedLayerMasksOverride
    BaseControllerPointer.FocusTarget
    BaseControllerPointer.Result
    BaseControllerPointer.RayStabilizer
    BaseControllerPointer.SceneQueryType
    BaseControllerPointer.SphereCastRadius
    BaseControllerPointer.Position
    BaseControllerPointer.Rotation
    BaseControllerPointer.Equals(Object)
    BaseControllerPointer.GetHashCode()
    BaseControllerPointer.Reset()
    ControllerPoseSynchronizer.Handedness
    ControllerPoseSynchronizer.DestroyOnSourceLost
    ControllerPoseSynchronizer.IsTracked
    ControllerPoseSynchronizer.TrackingState
    ControllerPoseSynchronizer.UseSourcePoseData
    ControllerPoseSynchronizer.PoseAction
    ControllerPoseSynchronizer.RegisterHandlers()
    ControllerPoseSynchronizer.UnregisterHandlers()
    ControllerPoseSynchronizer.OnSourcePoseChanged(SourcePoseEventData<TrackingState>)
    ControllerPoseSynchronizer.OnSourcePoseChanged(SourcePoseEventData<Vector2>)
    ControllerPoseSynchronizer.OnSourcePoseChanged(SourcePoseEventData<Vector3>)
    ControllerPoseSynchronizer.OnSourcePoseChanged(SourcePoseEventData<Quaternion>)
    ControllerPoseSynchronizer.OnSourcePoseChanged(SourcePoseEventData<MixedRealityPose>)
    ControllerPoseSynchronizer.OnInputChanged(InputEventData<Single>)
    ControllerPoseSynchronizer.OnInputChanged(InputEventData<Vector2>)
    ControllerPoseSynchronizer.OnInputChanged(InputEventData<Vector3>)
    ControllerPoseSynchronizer.OnInputChanged(InputEventData<Quaternion>)
    ControllerPoseSynchronizer.OnInputChanged(InputEventData<MixedRealityPose>)
    InputSystemGlobalHandlerListener.EnsureInputSystemValid()
    Namespace: Microsoft.MixedReality.Toolkit.Input
    Assembly: cs.temp.dll.dll
    Syntax
    public class PokePointer : BaseControllerPointer, MonoBehaviour, IMixedRealityControllerPoseSynchronizer, IMixedRealitySourcePoseHandler, IMixedRealitySourceStateHandler, IMixedRealityInputHandler, IMixedRealityBaseInputHandler, IMixedRealityInputHandler<float>, IMixedRealityInputHandler<Vector2>, IMixedRealityInputHandler<Vector3>, IMixedRealityInputHandler<Quaternion>, IMixedRealityInputHandler<MixedRealityPose>, IEventSystemHandler, IMixedRealityNearPointer, IMixedRealityPointer, IEqualityComparer
    Remarks

    Reachable Objects are objects with a both a BaseNearInteractionTouchable and a collider within TouchableDistance from the poke pointer (based on OverlapSphere).

    If a poke pointer has no CurrentTouchableObjectDown, then it will try to select one from the Reachable Objects based on:

    1. Layer mask priority: Lower-priority layer masks will only be considered if higher-priority layers don't contain any Reachable Objects.
    2. Touchable Distance: the closest object in the highest priority layers is selected based on DistanceToTouchable.
    3. Ray Distance: The object becomes the CurrentTouchableObjectDown once the ray cast distance becomes negative (behind the surface). At this point the OnTouchStarted or OnPointerDown event is raised.

    If a poke pointer does have a CurrentTouchableObjectDown it will not consider any other object, until the DistanceToTouchable exceeds the DebounceThreshold (in front of the surface). At this point the active object is cleared and the OnTouchCompleted or OnPointerUp event is raised.

    Fields

    line

    Declaration
    protected LineRenderer line
    Field Value
    Type Description
    LineRenderer

    line

    Declaration
    protected LineRenderer line
    Field Value
    Type Description
    LineRenderer

    touchableDistance

    Declaration
    protected float touchableDistance
    Field Value
    Type Description
    Single

    touchableDistance

    Declaration
    protected float touchableDistance
    Field Value
    Type Description
    Single

    triggerInteraction

    Declaration
    protected QueryTriggerInteraction triggerInteraction
    Field Value
    Type Description
    QueryTriggerInteraction

    triggerInteraction

    Declaration
    protected QueryTriggerInteraction triggerInteraction
    Field Value
    Type Description
    QueryTriggerInteraction

    visuals

    Declaration
    protected GameObject visuals
    Field Value
    Type Description
    GameObject

    visuals

    Declaration
    protected GameObject visuals
    Field Value
    Type Description
    GameObject

    Properties

    ClosestProximityTouchable

    The closest touchable component that has been detected.

    Declaration
    public BaseNearInteractionTouchable ClosestProximityTouchable { get; }
    Property Value
    Type Description
    BaseNearInteractionTouchable
    Remarks

    The closest touchable component limits the set of objects which are currently touchable. These are all the game objects in the subtree of the closest touchable component's owner object.

    ClosestProximityTouchable

    The closest touchable component that has been detected.

    Declaration
    public BaseNearInteractionTouchable ClosestProximityTouchable { get; }
    Property Value
    Type Description
    BaseNearInteractionTouchable
    Remarks

    The closest touchable component limits the set of objects which are currently touchable. These are all the game objects in the subtree of the closest touchable component's owner object.

    CurrentTouchableObjectDown

    The current object that is being touched.

    Declaration
    public GameObject CurrentTouchableObjectDown { get; }
    Property Value
    Type Description
    GameObject

    CurrentTouchableObjectDown

    The current object that is being touched.

    Declaration
    public GameObject CurrentTouchableObjectDown { get; }
    Property Value
    Type Description
    GameObject

    IgnoreCollidersNotInFOV

    Whether to ignore colliders that may be near the pointer, but not actually in the visual FOV. This can prevent accidental touches, and will allow hand rays to turn on when you may be near a touchable but cannot see it. Visual FOV is defined by cone centered about display center, radius equal to half display height.

    Declaration
    public bool IgnoreCollidersNotInFOV { get; set; }
    Property Value
    Type Description
    Boolean

    IsInteractionEnabled

    Declaration
    public override bool IsInteractionEnabled { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    BaseControllerPointer.IsInteractionEnabled

    IsInteractionEnabled

    Declaration
    public override bool IsInteractionEnabled { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    BaseControllerPointer.IsInteractionEnabled

    IsNearObject

    Declaration
    public bool IsNearObject { get; }
    Property Value
    Type Description
    Boolean

    IsNearObject

    Declaration
    public bool IsNearObject { get; }
    Property Value
    Type Description
    Boolean

    PokeLayerMasks

    The LayerMasks, in prioritized order, that are used to determine the touchable objects.

    Declaration
    public LayerMask[] PokeLayerMasks { get; }
    Property Value
    Type Description
    LayerMask[]
    Remarks

    Only BaseNearInteractionTouchables in one of the LayerMasks will raise touch events.

    PokeLayerMasks

    The LayerMasks, in prioritized order, that are used to determine the touchable objects.

    Declaration
    public LayerMask[] PokeLayerMasks { get; }
    Property Value
    Type Description
    LayerMask[]
    Remarks

    Only BaseNearInteractionTouchables in one of the LayerMasks will raise touch events.

    PreviousPosition

    Declaration
    public Vector3 PreviousPosition { get; }
    Property Value
    Type Description
    Vector3

    PreviousPosition

    Declaration
    public Vector3 PreviousPosition { get; }
    Property Value
    Type Description
    Vector3

    SceneQueryBufferSize

    Maximum number of colliders that can be detected in a scene query.

    Declaration
    public int SceneQueryBufferSize { get; }
    Property Value
    Type Description
    Int32

    SceneQueryBufferSize

    Maximum number of colliders that can be detected in a scene query.

    Declaration
    public int SceneQueryBufferSize { get; }
    Property Value
    Type Description
    Int32

    TouchableDistance

    Maximum distance a which a touchable surface can be interacted with.

    Declaration
    public float TouchableDistance { get; }
    Property Value
    Type Description
    Single

    TouchableDistance

    Maximum distance a which a touchable surface can be interacted with.

    Declaration
    public float TouchableDistance { get; }
    Property Value
    Type Description
    Single

    TriggerInteraction

    Specify whether queries for touchable surfaces hit triggers.

    Declaration
    public QueryTriggerInteraction TriggerInteraction { get; }
    Property Value
    Type Description
    QueryTriggerInteraction

    TriggerInteraction

    Specify whether queries for touchable surfaces hit triggers.

    Declaration
    public QueryTriggerInteraction TriggerInteraction { get; }
    Property Value
    Type Description
    QueryTriggerInteraction

    Methods

    OnEnable()

    Declaration
    protected override void OnEnable()
    Overrides
    BaseControllerPointer.OnEnable()

    OnEnable()

    Declaration
    protected override void OnEnable()
    Overrides
    BaseControllerPointer.OnEnable()

    OnInputDown(InputEventData)

    Declaration
    public override void OnInputDown(InputEventData eventData)
    Parameters
    Type Name Description
    InputEventData eventData
    Overrides
    BaseControllerPointer.OnInputDown(InputEventData)

    OnInputDown(InputEventData)

    Declaration
    public override void OnInputDown(InputEventData eventData)
    Parameters
    Type Name Description
    InputEventData eventData
    Overrides
    BaseControllerPointer.OnInputDown(InputEventData)

    OnInputUp(InputEventData)

    Declaration
    public override void OnInputUp(InputEventData eventData)
    Parameters
    Type Name Description
    InputEventData eventData
    Overrides
    BaseControllerPointer.OnInputUp(InputEventData)

    OnInputUp(InputEventData)

    Declaration
    public override void OnInputUp(InputEventData eventData)
    Parameters
    Type Name Description
    InputEventData eventData
    Overrides
    BaseControllerPointer.OnInputUp(InputEventData)

    OnPostSceneQuery()

    Declaration
    public override void OnPostSceneQuery()
    Overrides
    BaseControllerPointer.OnPostSceneQuery()

    OnPostSceneQuery()

    Declaration
    public override void OnPostSceneQuery()
    Overrides
    BaseControllerPointer.OnPostSceneQuery()

    OnPreCurrentPointerTargetChange()

    Declaration
    public override void OnPreCurrentPointerTargetChange()
    Overrides
    BaseControllerPointer.OnPreCurrentPointerTargetChange()

    OnPreCurrentPointerTargetChange()

    Declaration
    public override void OnPreCurrentPointerTargetChange()
    Overrides
    BaseControllerPointer.OnPreCurrentPointerTargetChange()

    OnPreSceneQuery()

    Declaration
    public override void OnPreSceneQuery()
    Overrides
    BaseControllerPointer.OnPreSceneQuery()

    OnPreSceneQuery()

    Declaration
    public override void OnPreSceneQuery()
    Overrides
    BaseControllerPointer.OnPreSceneQuery()

    OnSourceDetected(SourceStateEventData)

    Declaration
    public override void OnSourceDetected(SourceStateEventData eventData)
    Parameters
    Type Name Description
    SourceStateEventData eventData
    Overrides
    ControllerPoseSynchronizer.OnSourceDetected(SourceStateEventData)

    OnSourceDetected(SourceStateEventData)

    Declaration
    public override void OnSourceDetected(SourceStateEventData eventData)
    Parameters
    Type Name Description
    SourceStateEventData eventData
    Overrides
    ControllerPoseSynchronizer.OnSourceDetected(SourceStateEventData)

    OnSourceLost(SourceStateEventData)

    Declaration
    public override void OnSourceLost(SourceStateEventData eventData)
    Parameters
    Type Name Description
    SourceStateEventData eventData
    Overrides
    BaseControllerPointer.OnSourceLost(SourceStateEventData)

    OnSourceLost(SourceStateEventData)

    Declaration
    public override void OnSourceLost(SourceStateEventData eventData)
    Parameters
    Type Name Description
    SourceStateEventData eventData
    Overrides
    BaseControllerPointer.OnSourceLost(SourceStateEventData)

    OnValidate()

    Declaration
    protected void OnValidate()

    OnValidate()

    Declaration
    protected void OnValidate()

    Explicit Interface Implementations

    IMixedRealityNearPointer.TryGetDistanceToNearestSurface(out Single)

    Declaration
    bool IMixedRealityNearPointer.TryGetDistanceToNearestSurface(out float distance)
    Parameters
    Type Name Description
    Single distance
    Returns
    Type Description
    Boolean

    IMixedRealityNearPointer.TryGetDistanceToNearestSurface(out Single)

    Declaration
    bool IMixedRealityNearPointer.TryGetDistanceToNearestSurface(out float distance)
    Parameters
    Type Name Description
    Single distance
    Returns
    Type Description
    Boolean

    IMixedRealityNearPointer.TryGetNearGraspPoint(out Vector3)

    Declaration
    bool IMixedRealityNearPointer.TryGetNearGraspPoint(out Vector3 position)
    Parameters
    Type Name Description
    Vector3 position
    Returns
    Type Description
    Boolean

    IMixedRealityNearPointer.TryGetNearGraspPoint(out Vector3)

    Declaration
    bool IMixedRealityNearPointer.TryGetNearGraspPoint(out Vector3 position)
    Parameters
    Type Name Description
    Vector3 position
    Returns
    Type Description
    Boolean

    IMixedRealityNearPointer.TryGetNormalToNearestSurface(out Vector3)

    Declaration
    bool IMixedRealityNearPointer.TryGetNormalToNearestSurface(out Vector3 normal)
    Parameters
    Type Name Description
    Vector3 normal
    Returns
    Type Description
    Boolean

    IMixedRealityNearPointer.TryGetNormalToNearestSurface(out Vector3)

    Declaration
    bool IMixedRealityNearPointer.TryGetNormalToNearestSurface(out Vector3 normal)
    Parameters
    Type Name Description
    Vector3 normal
    Returns
    Type Description
    Boolean

    Implements

    MonoBehaviour
    IMixedRealityControllerPoseSynchronizer
    IMixedRealitySourcePoseHandler
    IMixedRealitySourceStateHandler
    IMixedRealityInputHandler
    IMixedRealityBaseInputHandler
    IMixedRealityInputHandler<T>
    IMixedRealityInputHandler<T>
    IMixedRealityInputHandler<T>
    IMixedRealityInputHandler<T>
    IMixedRealityInputHandler<T>
    IEventSystemHandler
    IMixedRealityNearPointer
    IMixedRealityPointer
    IEqualityComparer
    In This Article
    • Fields
      • line
      • line
      • touchableDistance
      • touchableDistance
      • triggerInteraction
      • triggerInteraction
      • visuals
      • visuals
    • Properties
      • ClosestProximityTouchable
      • ClosestProximityTouchable
      • CurrentTouchableObjectDown
      • CurrentTouchableObjectDown
      • IgnoreCollidersNotInFOV
      • IsInteractionEnabled
      • IsInteractionEnabled
      • IsNearObject
      • IsNearObject
      • PokeLayerMasks
      • PokeLayerMasks
      • PreviousPosition
      • PreviousPosition
      • SceneQueryBufferSize
      • SceneQueryBufferSize
      • TouchableDistance
      • TouchableDistance
      • TriggerInteraction
      • TriggerInteraction
    • Methods
      • OnEnable()
      • OnEnable()
      • OnInputDown(InputEventData)
      • OnInputDown(InputEventData)
      • OnInputUp(InputEventData)
      • OnInputUp(InputEventData)
      • OnPostSceneQuery()
      • OnPostSceneQuery()
      • OnPreCurrentPointerTargetChange()
      • OnPreCurrentPointerTargetChange()
      • OnPreSceneQuery()
      • OnPreSceneQuery()
      • OnSourceDetected(SourceStateEventData)
      • OnSourceDetected(SourceStateEventData)
      • OnSourceLost(SourceStateEventData)
      • OnSourceLost(SourceStateEventData)
      • OnValidate()
      • OnValidate()
    • Explicit Interface Implementations
      • IMixedRealityNearPointer.TryGetDistanceToNearestSurface(out Single)
      • IMixedRealityNearPointer.TryGetDistanceToNearestSurface(out Single)
      • IMixedRealityNearPointer.TryGetNearGraspPoint(out Vector3)
      • IMixedRealityNearPointer.TryGetNearGraspPoint(out Vector3)
      • IMixedRealityNearPointer.TryGetNormalToNearestSurface(out Vector3)
      • IMixedRealityNearPointer.TryGetNormalToNearestSurface(out Vector3)
    • Implements
    Back to top Generated by DocFX