mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class SpherePointer

    Inheritance
    Object
    InputSystemGlobalHandlerListener
    ControllerPoseSynchronizer
    BaseControllerPointer
    SpherePointer
    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.OnEnable()
    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.SphereCastRadius
    BaseControllerPointer.Position
    BaseControllerPointer.Rotation
    BaseControllerPointer.OnPostSceneQuery()
    BaseControllerPointer.OnPreCurrentPointerTargetChange()
    BaseControllerPointer.Equals(Object)
    BaseControllerPointer.GetHashCode()
    BaseControllerPointer.OnSourceLost(SourceStateEventData)
    BaseControllerPointer.OnInputUp(InputEventData)
    BaseControllerPointer.OnInputDown(InputEventData)
    BaseControllerPointer.Reset()
    ControllerPoseSynchronizer.Handedness
    ControllerPoseSynchronizer.DestroyOnSourceLost
    ControllerPoseSynchronizer.IsTracked
    ControllerPoseSynchronizer.TrackingState
    ControllerPoseSynchronizer.UseSourcePoseData
    ControllerPoseSynchronizer.PoseAction
    ControllerPoseSynchronizer.RegisterHandlers()
    ControllerPoseSynchronizer.UnregisterHandlers()
    ControllerPoseSynchronizer.OnSourceDetected(SourceStateEventData)
    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 SpherePointer : BaseControllerPointer, MonoBehaviour, IMixedRealityControllerPoseSynchronizer, IMixedRealitySourcePoseHandler, IMixedRealitySourceStateHandler, IMixedRealityInputHandler, IMixedRealityBaseInputHandler, IMixedRealityInputHandler<float>, IMixedRealityInputHandler<Vector2>, IMixedRealityInputHandler<Vector3>, IMixedRealityInputHandler<Quaternion>, IMixedRealityInputHandler<MixedRealityPose>, IEventSystemHandler, IMixedRealityNearPointer, IMixedRealityPointer, IEqualityComparer

    Fields

    triggerInteraction

    Declaration
    protected QueryTriggerInteraction triggerInteraction
    Field Value
    Type Description
    QueryTriggerInteraction

    triggerInteraction

    Declaration
    protected QueryTriggerInteraction triggerInteraction
    Field Value
    Type Description
    QueryTriggerInteraction

    Properties

    GrabLayerMasks

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

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

    Only NearInteractionGrabbables in one of the LayerMasks will raise events.

    GrabLayerMasks

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

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

    Only NearInteractionGrabbables in one of the LayerMasks will raise events.

    IgnoreCollidersNotInFOV

    Whether to ignore colliders that may be near the pointer, but not actually in the visual FOV. This can prevent accidental grabs, and will allow hand rays to turn on when you may be near a grabbable 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

    Test if the pointer is within the grabbable radius of collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable. Uses SphereCastRadius to determine if near an object. Note: if focus on pointer is locked, will always return true.

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

    True if the pointer is within the grabbable radius of collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.

    Overrides
    BaseControllerPointer.IsInteractionEnabled

    IsInteractionEnabled

    Test if the pointer is within the grabbable radius of collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable. Uses SphereCastRadius to determine if near an object. Note: if focus on pointer is locked, will always return true.

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

    True if the pointer is within the grabbable radius of collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.

    Overrides
    BaseControllerPointer.IsInteractionEnabled

    IsNearObject

    Test if the pointer is near any collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable. Uses SphereCastRadius + NearObjectMargin to determine if near an object.

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

    True if the pointer is near any collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.

    IsNearObject

    Test if the pointer is near any collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable. Uses SphereCastRadius + NearObjectMargin to determine if near an object.

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

    True if the pointer is near any collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.

    NearObjectMargin

    Additional distance on top ofSphereCastRadius when pointer is considered 'near' an object and far interaction will turn off.

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

    This creates a dead zone in which far interaction is disabled before objects become grabbable.

    NearObjectMargin

    Additional distance on top ofSphereCastRadius when pointer is considered 'near' an object and far interaction will turn off.

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

    This creates a dead zone in which far interaction is disabled before objects become grabbable.

    NearObjectRadius

    Distance at which the pointer is considered "near" an object.

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

    Sum of SphereCastRadius and NearObjectMargin. Entering the NearObjectRadius disables far interaction.

    NearObjectRadius

    Distance at which the pointer is considered "near" an object.

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

    Sum of SphereCastRadius and NearObjectMargin. Entering the NearObjectRadius disables far interaction.

    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

    SceneQueryType

    Declaration
    public override SceneQueryType SceneQueryType { get; set; }
    Property Value
    Type Description
    SceneQueryType
    Overrides
    BaseControllerPointer.SceneQueryType

    SceneQueryType

    Declaration
    public override SceneQueryType SceneQueryType { get; set; }
    Property Value
    Type Description
    SceneQueryType
    Overrides
    BaseControllerPointer.SceneQueryType

    TriggerInteraction

    Specify whether queries for grabbable objects hit triggers.

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

    TriggerInteraction

    Specify whether queries for grabbable objects hit triggers.

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

    Methods

    OnPreSceneQuery()

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

    OnPreSceneQuery()

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

    TryGetDistanceToNearestSurface(out Single)

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

    TryGetDistanceToNearestSurface(out Single)

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

    TryGetNearGraspPoint(out Vector3)

    Gets the position of where grasp happens For IMixedRealityHand it's the average of index and thumb. For any other IMixedRealityController, return just the pointer origin

    Declaration
    public bool TryGetNearGraspPoint(out Vector3 result)
    Parameters
    Type Name Description
    Vector3 result
    Returns
    Type Description
    Boolean

    TryGetNearGraspPoint(out Vector3)

    Gets the position of where grasp happens For IMixedRealityHand it's the average of index and thumb. For any other IMixedRealityController, return just the pointer origin

    Declaration
    public bool TryGetNearGraspPoint(out Vector3 result)
    Parameters
    Type Name Description
    Vector3 result
    Returns
    Type Description
    Boolean

    TryGetNormalToNearestSurface(out Vector3)

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

    TryGetNormalToNearestSurface(out Vector3)

    Declaration
    public bool 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
      • triggerInteraction
      • triggerInteraction
    • Properties
      • GrabLayerMasks
      • GrabLayerMasks
      • IgnoreCollidersNotInFOV
      • IsInteractionEnabled
      • IsInteractionEnabled
      • IsNearObject
      • IsNearObject
      • NearObjectMargin
      • NearObjectMargin
      • NearObjectRadius
      • NearObjectRadius
      • SceneQueryBufferSize
      • SceneQueryBufferSize
      • SceneQueryType
      • SceneQueryType
      • TriggerInteraction
      • TriggerInteraction
    • Methods
      • OnPreSceneQuery()
      • OnPreSceneQuery()
      • TryGetDistanceToNearestSurface(out Single)
      • TryGetDistanceToNearestSurface(out Single)
      • TryGetNearGraspPoint(out Vector3)
      • TryGetNearGraspPoint(out Vector3)
      • TryGetNormalToNearestSurface(out Vector3)
      • TryGetNormalToNearestSurface(out Vector3)
    • Implements
    Back to top Generated by DocFX