mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0releases/2.3.0releases/2.4.0releases/2.5.0releases/2.5.1releases/2.5.2releases/2.5.3

We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

Search Results for

    Show / Hide Table of Contents

    Class TestHand

    Utility class to use a simulated hand

    Inheritance
    Object
    TestController
    TestHand
    Inherited Members
    TestController.handedness
    TestController.position
    TestController.rotation
    TestController.simulationService
    TestController.GetVelocity()
    TestController.GetPointer<T>()
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Tests
    Assembly: cs.temp.dll.dll
    Syntax
    public class TestHand : TestController

    Constructors

    TestHand(Handedness)

    Declaration
    public TestHand(Handedness handedness)
    Parameters
    Type Name Description
    Handedness handedness

    Methods

    Click()

    Combined sequence of pinching and unpinching

    Declaration
    public override IEnumerator Click()
    Returns
    Type Description
    IEnumerator
    Overrides
    TestController.Click()

    GrabAndThrowAt(Vector3, Boolean, Int32)

    Combined sequence of pinching, moving, and releasing.

    Declaration
    public IEnumerator GrabAndThrowAt(Vector3 positionToRelease, bool waitForFinalFixedUpdate, int numSteps = 30)
    Parameters
    Type Name Description
    Vector3 positionToRelease

    The position to which the hand moves while pinching

    Boolean waitForFinalFixedUpdate

    Wait for a final physics update after releasing

    Int32 numSteps

    Number of steps of the hand movement

    Returns
    Type Description
    IEnumerator

    Hide(Boolean)

    Hide the controller

    Declaration
    public override IEnumerator Hide(bool waitForFixedUpdate = true)
    Parameters
    Type Name Description
    Boolean waitForFixedUpdate

    If true, will wait a physics frame after hiding

    Returns
    Type Description
    IEnumerator
    Overrides
    TestController.Hide(Boolean)

    Move(Vector3, Int32)

    Move the controller by some given delta

    Declaration
    public override IEnumerator Move(Vector3 delta, int numSteps = -1)
    Parameters
    Type Name Description
    Vector3 delta

    Amount to move the controller by.

    Int32 numSteps

    How many frames to move over. This defaults to the "sentinel" value which tells the system to use the default number of steps. For more information on this value, see Microsoft.MixedReality.Toolkit.Tests.PlayModeTestUtilities.ControllerMoveStepsSentinelValue

    Returns
    Type Description
    IEnumerator
    Overrides
    TestController.Move(Vector3, Int32)

    MoveTo(Vector3, Int32, Boolean)

    Move controller to given position over some number of frames

    Declaration
    public override IEnumerator MoveTo(Vector3 newPosition, int numSteps = -1, bool waitForFixedUpdate = true)
    Parameters
    Type Name Description
    Vector3 newPosition

    Where to move controller to

    Int32 numSteps

    How many frames to move over. This defaults to the "sentinel" value which tells the system to use the default number of steps. For more information on this value, see Microsoft.MixedReality.Toolkit.Tests.PlayModeTestUtilities.ControllerMoveStepsSentinelValue

    Boolean waitForFixedUpdate

    If true, waits a physics frame after moving the controller

    Returns
    Type Description
    IEnumerator
    Overrides
    TestController.MoveTo(Vector3, Int32, Boolean)

    SetGesture(ArticulatedHandPose.GestureId, Boolean)

    Changes the hand's pose to the given gesture. Does not animate the hand between the current pose and new pose.

    Declaration
    public IEnumerator SetGesture(ArticulatedHandPose.GestureId newGestureId, bool waitForFixedUpdate = true)
    Parameters
    Type Name Description
    ArticulatedHandPose.GestureId newGestureId

    The new hand pose

    Boolean waitForFixedUpdate

    If true, waits for a fixed update after moving to the new pose.

    Returns
    Type Description
    IEnumerator

    SetRotation(Quaternion, Int32)

    Rotate the controller to new rotation

    Declaration
    public override IEnumerator SetRotation(Quaternion newRotation, int numSteps = -1)
    Parameters
    Type Name Description
    Quaternion newRotation

    New rotation of controller

    Int32 numSteps

    Number of frames to rotate over.

    Returns
    Type Description
    IEnumerator
    Overrides
    TestController.SetRotation(Quaternion, Int32)

    Show(Vector3, Boolean)

    Show the controller at a specified position

    Declaration
    public override IEnumerator Show(Vector3 position, bool waitForFixedUpdate = true)
    Parameters
    Type Name Description
    Vector3 position

    Where to show the controller

    Boolean waitForFixedUpdate

    If true, will wait for a physics frame after showing the controller.

    Returns
    Type Description
    IEnumerator
    Overrides
    TestController.Show(Vector3, Boolean)
    In This Article
    • Constructors
      • TestHand(Handedness)
    • Methods
      • Click()
      • GrabAndThrowAt(Vector3, Boolean, Int32)
      • Hide(Boolean)
      • Move(Vector3, Int32)
      • MoveTo(Vector3, Int32, Boolean)
      • SetGesture(ArticulatedHandPose.GestureId, Boolean)
      • SetRotation(Quaternion, Int32)
      • Show(Vector3, Boolean)
    Back to top Generated by DocFX