Class TestHand
Utility class to use a simulated hand
Inherited Members
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
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
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
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
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
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 |