Show / Hide Table of Contents

    Class TwoHandRotateLogic

    Implements common logic for rotating holograms using a handlebar metaphor. each frame, object_rotation_delta = rotation_delta(current_hands_vector, previous_hands_vector) where hands_vector is the vector between two hand/controller positions.

    Usage: When a manipulation starts, call Setup. Call Update any time to update the move logic and get a new rotation for the object.

    Inheritance
    Object
    TwoHandRotateLogic
    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.Physics
    Assembly: cs.temp.dll.dll
    Syntax
    public class TwoHandRotateLogic

    Methods

    Setup(Dictionary<UInt32, Vector3>, Transform, RotationConstraintType)

    Setup the rotation logic.

    Declaration
    public void Setup(Dictionary<uint, Vector3> handsPressedMap, Transform t, RotationConstraintType rotationConstraint)
    Parameters
    Type Name Description
    Dictionary<UInt32, Vector3> handsPressedMap
    Transform t
    RotationConstraintType rotationConstraint

    Setup(Vector3[], Transform)

    Setup the rotation logic.

    Declaration
    public void Setup(Vector3[] handsPressedArray, Transform t)
    Parameters
    Type Name Description
    Vector3[] handsPressedArray

    Array with positions of down pointers

    Transform t

    Update(Dictionary<UInt32, Vector3>, Quaternion, RotationConstraintType, Boolean)

    Update the rotation based on input.

    Declaration
    public Quaternion Update(Dictionary<uint, Vector3> handsPressedMap, Quaternion currentRotation, RotationConstraintType rotationConstraint, bool useLocalSpaceForConstraint)
    Parameters
    Type Name Description
    Dictionary<UInt32, Vector3> handsPressedMap
    Quaternion currentRotation
    RotationConstraintType rotationConstraint
    Boolean useLocalSpaceForConstraint
    Returns
    Type Description
    Quaternion

    Desired rotation

    Update(Vector3[], Quaternion)

    Update the rotation based on input.

    Declaration
    public Quaternion Update(Vector3[] handsPressedArray, Quaternion currentRotation)
    Parameters
    Type Name Description
    Vector3[] handsPressedArray

    Array with positions of down pointers, order should be the same as handsPressedArray provided in Setup

    Quaternion currentRotation
    Returns
    Type Description
    Quaternion

    Desired rotation

    Back to top Generated by DocFX