XRTK.Ultraleap/Packages/com.xrtk.ultraleap/Runtime/Extensions/TransformExtensions.cs
/// <summary>
/// Extracts a transform matrix containing translation, rotation, and scale from a Unity Transform object and returns a Leap Motion LeapTransform object.
/// Use this matrix to transform Leap Motion tracking data to the Unity world relative to the specified transform.
/// 
/// In addition to applying the translation, rotation, and scale from the Transform object, the returned
/// transformation changes the coordinate system from right- to left-handed and converts units from millimeters to meters by scaling.
/// </summary>
/// <param name="t">The Unity <see cref="Transform"/> the translation is relative to.</param>
/// <returns>A <see cref="LeapTransform"/> object representing the specified transform from Leap Motion into Unity space.</returns>
Extracts a transform matrix containing translation, rotation, and scale from a Unity Transform object and returns a Leap Motion LeapTransform object.
Use this matrix to transform Leap Motion tracking data to the Unity world relative to the specified transform.

In addition to applying the translation, rotation, and scale from the Transform object, the returned
transformation changes the coordinate system from right- to left-handed and converts units from millimeters to meters by scaling.
Extracts a transform matrix containing translation rotation and scale from a Unity Transform object and returns a Leap Motion LeapTransform object . Use this matrix to transform Leap Motion tracking data to the Unity world relative to the specified transform . In addition to applying the translation rotation and scale from the Transform object the returned transformation changes the coordinate system from right - to left - handed and converts units from millimeters to meters by scaling .
public static LeapTransform GetLeapMatrix(this Transform t)
        {
            Vector scale = new Vector(t.lossyScale.x * millimetersToMeters, t.lossyScale.y * millimetersToMeters, t.lossyScale.z * millimetersToMeters);
            LeapTransform transform = new LeapTransform(t.position.ToVector(), t.rotation.ToLeapQuaternion(), scale);
            transform.MirrorZ(); 
            return transform;
        }
public static LeapTransform GetLeapMatrix ( this Transform t ) { Vector scale = new Vector ( t . lossyScale . x * millimetersToMeters , t . lossyScale . y * millimetersToMeters , t . lossyScale . z * millimetersToMeters ) ; LeapTransform transform = new LeapTransform ( t . position . ToVector ( ) , t . rotation . ToLeapQuaternion ( ) , scale ) ; transform . MirrorZ ( ) ; return transform ; }
Extracts a transform matrix containing translation, rotation, and scale from a Unity Transform object and returns a Leap Motion LeapTransform object.
Extracts a transform matrix containing translation rotation and scale from a Unity Transform object and returns a Leap Motion LeapTransform object .
// Unity is left handed.
A  object representing the specified transform from Leap Motion into Unity space.
A object representing the specified transform from Leap Motion into Unity space .
Transform
this
t
The Unity  the translation is relative to.
The Unity the translation is relative to .