mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class TwoHandScaleLogic

    Implements a scale logic that will scale an object based on the ratio of the distance between hands. object_scale = start_object_scale * curr_hand_dist / start_hand_dist

    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
    TwoHandScaleLogic
    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 TwoHandScaleLogic

    Methods

    Setup(Dictionary<UInt32, Vector3>, Transform)

    Initialize system with source info from controllers/hands

    Declaration
    public virtual void Setup(Dictionary<uint, Vector3> handsPressedMap, Transform manipulationRoot)
    Parameters
    Type Name Description
    Dictionary<UInt32, Vector3> handsPressedMap

    Dictionary that maps inputSources to states

    Transform manipulationRoot

    Transform of gameObject to be manipulated

    Setup(Vector3[], Transform)

    Initialize system with source info from controllers/hands

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

    Array with positions of down pointers

    Transform manipulationRoot

    Transform of gameObject to be manipulated

    UpdateMap(Dictionary<UInt32, Vector3>)

    update GameObject with new Scale state

    Declaration
    public virtual Vector3 UpdateMap(Dictionary<uint, Vector3> handsPressedMap)
    Parameters
    Type Name Description
    Dictionary<UInt32, Vector3> handsPressedMap
    Returns
    Type Description
    Vector3

    a Vector3 describing the new Scale of the object being manipulated

    UpdateMap(Vector3[])

    update GameObject with new Scale state

    Declaration
    public virtual Vector3 UpdateMap(Vector3[] handsPressedArray)
    Parameters
    Type Name Description
    Vector3[] handsPressedArray

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

    Returns
    Type Description
    Vector3

    a Vector3 describing the new Scale of the object being manipulated

    In This Article
    • Methods
      • Setup(Dictionary<UInt32, Vector3>, Transform)
      • Setup(Vector3[], Transform)
      • UpdateMap(Dictionary<UInt32, Vector3>)
      • UpdateMap(Vector3[])
    Back to top Generated by DocFX