日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class TestMotionController

    Utility class to use a simulated motion controller

    Inheritance
    Object
    TestController
    TestMotionController
    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 TestMotionController : TestController

    Constructors

    TestMotionController(Handedness)

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

    Methods

    Click()

    Combined sequence of selecting and unselecting

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

    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)

    SelectAndThrowAt(Vector3, Boolean, Int32)

    Combined sequence of selecting, moving, and releasing.

    Declaration
    public IEnumerator SelectAndThrowAt(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

    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)

    SetState(SimulatedMotionControllerButtonState, Boolean)

    Changes the state of the simulated motion controller.

    Declaration
    public IEnumerator SetState(SimulatedMotionControllerButtonState buttonStateNew, bool waitForFixedUpdate = true)
    Parameters
    Type Name Description
    SimulatedMotionControllerButtonState buttonStateNew
    Boolean waitForFixedUpdate

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

    Returns
    Type Description
    IEnumerator

    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)
    Back to top Generated by DocFX