mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class MixedRealityControllerInfo

    This script keeps track of the GameObjects representations for each button on the Mixed Reality Controllers. It also keeps track of the animation Transforms in order to properly animate according to user input.

    Inheritance
    Object
    MixedRealityControllerInfo
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Input
    Assembly: cs.temp.dll.dll
    Syntax
    public class MixedRealityControllerInfo

    Constructors

    MixedRealityControllerInfo(GameObject, Handedness)

    Declaration
    public MixedRealityControllerInfo(GameObject controllerParent, Handedness handedness)
    Parameters
    Type Name Description
    GameObject controllerParent
    Handedness handedness

    MixedRealityControllerInfo(GameObject, Handedness)

    Declaration
    public MixedRealityControllerInfo(GameObject controllerParent, Handedness handedness)
    Parameters
    Type Name Description
    GameObject controllerParent
    Handedness handedness

    Fields

    ControllerParent

    Declaration
    public readonly GameObject ControllerParent
    Field Value
    Type Description
    GameObject

    ControllerParent

    Declaration
    public readonly GameObject ControllerParent
    Field Value
    Type Description
    GameObject

    Handedness

    Declaration
    public readonly Handedness Handedness
    Field Value
    Type Description
    Handedness

    Handedness

    Declaration
    public readonly Handedness Handedness
    Field Value
    Type Description
    Handedness

    Methods

    AnimateGrasp(Boolean)

    Declaration
    public void AnimateGrasp(bool isGrasped)
    Parameters
    Type Name Description
    Boolean isGrasped

    AnimateGrasp(Boolean)

    Declaration
    public void AnimateGrasp(bool isGrasped)
    Parameters
    Type Name Description
    Boolean isGrasped

    AnimateHome(Boolean)

    Declaration
    public void AnimateHome(bool isHomePressed)
    Parameters
    Type Name Description
    Boolean isHomePressed

    AnimateHome(Boolean)

    Declaration
    public void AnimateHome(bool isHomePressed)
    Parameters
    Type Name Description
    Boolean isHomePressed

    AnimateMenu(Boolean)

    Declaration
    public void AnimateMenu(bool isMenuPressed)
    Parameters
    Type Name Description
    Boolean isMenuPressed

    AnimateMenu(Boolean)

    Declaration
    public void AnimateMenu(bool isMenuPressed)
    Parameters
    Type Name Description
    Boolean isMenuPressed

    AnimateSelect(Single)

    Declaration
    public void AnimateSelect(float newSelectPressedAmount)
    Parameters
    Type Name Description
    Single newSelectPressedAmount

    AnimateSelect(Single)

    Declaration
    public void AnimateSelect(float newSelectPressedAmount)
    Parameters
    Type Name Description
    Single newSelectPressedAmount

    AnimateThumbstick(Boolean, Vector2)

    Declaration
    public void AnimateThumbstick(bool isThumbstickPressed, Vector2 newThumbstickPosition)
    Parameters
    Type Name Description
    Boolean isThumbstickPressed
    Vector2 newThumbstickPosition

    AnimateThumbstick(Boolean, Vector2)

    Declaration
    public void AnimateThumbstick(bool isThumbstickPressed, Vector2 newThumbstickPosition)
    Parameters
    Type Name Description
    Boolean isThumbstickPressed
    Vector2 newThumbstickPosition

    AnimateTouchpad(Boolean, Boolean, Vector2)

    Declaration
    public void AnimateTouchpad(bool isTouchpadPressed, bool isTouchpadTouched, Vector2 newTouchpadPosition)
    Parameters
    Type Name Description
    Boolean isTouchpadPressed
    Boolean isTouchpadTouched
    Vector2 newTouchpadPosition

    AnimateTouchpad(Boolean, Boolean, Vector2)

    Declaration
    public void AnimateTouchpad(bool isTouchpadPressed, bool isTouchpadTouched, Vector2 newTouchpadPosition)
    Parameters
    Type Name Description
    Boolean isTouchpadPressed
    Boolean isTouchpadTouched
    Vector2 newTouchpadPosition

    LoadInfo(Transform[], MixedRealityControllerVisualizer)

    Iterates through the Transform array to find specifically named GameObjects. These GameObjects specify the animation bounds and the GameObject to modify for button, thumbstick, and touchpad animation.

    Declaration
    public void LoadInfo(Transform[] childTransforms, MixedRealityControllerVisualizer motionControllerVisualizer)
    Parameters
    Type Name Description
    Transform[] childTransforms

    The transforms of the glTF model.

    MixedRealityControllerVisualizer motionControllerVisualizer

    LoadInfo(Transform[], MixedRealityControllerVisualizer)

    Iterates through the Transform array to find specifically named GameObjects. These GameObjects specify the animation bounds and the GameObject to modify for button, thumbstick, and touchpad animation.

    Declaration
    public void LoadInfo(Transform[] childTransforms, MixedRealityControllerVisualizer motionControllerVisualizer)
    Parameters
    Type Name Description
    Transform[] childTransforms

    The transforms of the glTF model.

    MixedRealityControllerVisualizer motionControllerVisualizer

    SetRenderersVisible(Boolean)

    Declaration
    public void SetRenderersVisible(bool visible)
    Parameters
    Type Name Description
    Boolean visible

    SetRenderersVisible(Boolean)

    Declaration
    public void SetRenderersVisible(bool visible)
    Parameters
    Type Name Description
    Boolean visible

    TryGetElement(MixedRealityControllerInfo.ControllerElementEnum, out Transform)

    Declaration
    public bool TryGetElement(MixedRealityControllerInfo.ControllerElementEnum element, out Transform elementTransform)
    Parameters
    Type Name Description
    MixedRealityControllerInfo.ControllerElementEnum element
    Transform elementTransform
    Returns
    Type Description
    Boolean

    TryGetElement(MixedRealityControllerInfo.ControllerElementEnum, out Transform)

    Declaration
    public bool TryGetElement(MixedRealityControllerInfo.ControllerElementEnum element, out Transform elementTransform)
    Parameters
    Type Name Description
    MixedRealityControllerInfo.ControllerElementEnum element
    Transform elementTransform
    Returns
    Type Description
    Boolean
    In This Article
    • Constructors
      • MixedRealityControllerInfo(GameObject, Handedness)
      • MixedRealityControllerInfo(GameObject, Handedness)
    • Fields
      • ControllerParent
      • ControllerParent
      • Handedness
      • Handedness
    • Methods
      • AnimateGrasp(Boolean)
      • AnimateGrasp(Boolean)
      • AnimateHome(Boolean)
      • AnimateHome(Boolean)
      • AnimateMenu(Boolean)
      • AnimateMenu(Boolean)
      • AnimateSelect(Single)
      • AnimateSelect(Single)
      • AnimateThumbstick(Boolean, Vector2)
      • AnimateThumbstick(Boolean, Vector2)
      • AnimateTouchpad(Boolean, Boolean, Vector2)
      • AnimateTouchpad(Boolean, Boolean, Vector2)
      • LoadInfo(Transform[], MixedRealityControllerVisualizer)
      • LoadInfo(Transform[], MixedRealityControllerVisualizer)
      • SetRenderersVisible(Boolean)
      • SetRenderersVisible(Boolean)
      • TryGetElement(MixedRealityControllerInfo.ControllerElementEnum, out Transform)
      • TryGetElement(MixedRealityControllerInfo.ControllerElementEnum, out Transform)
    Back to top Generated by DocFX