Update to Ultraleap Gemini v5.12

Update to Ultraleap Unity Plugin v6.9.0
Unclamped spreads and curls
This commit is contained in:
SDraw 2023-07-04 11:51:58 +03:00
parent 176d6530cb
commit db93926f61
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
41 changed files with 1001 additions and 2573 deletions

View file

@ -1,5 +1,5 @@
/******************************************************************************
* Copyright (C) Ultraleap, Inc. 2011-2021. *
* Copyright (C) Ultraleap, Inc. 2011-2023. *
* *
* Use subject to the terms of the Apache License 2.0 available at *
* http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
@ -27,7 +27,6 @@ namespace Leap
[Serializable]
public class Bone : IEquatable<Bone>
{
#pragma warning disable 0618
/// <summary>
/// Constructs a default invalid Bone object.
///
@ -38,30 +37,6 @@ namespace Leap
Type = BoneType.TYPE_INVALID;
}
/// <summary>
/// Constructs a new Bone object.
/// @since 3.0
/// </summary>
[System.Obsolete("This signature will be removed in the next major version of the plugin. Use Bone with Vector3s instead. If you believe that it needs to be kept, please open a discussion on the GitHub forum (https://github.com/ultraleap/UnityPlugin/discussions)")]
public Bone(Vector prevJoint,
Vector nextJoint,
Vector center,
Vector direction,
float length,
float width,
Bone.BoneType type,
LeapQuaternion rotation)
{
PrevJoint = prevJoint;
NextJoint = nextJoint;
Center = center;
Direction = direction;
Rotation = rotation;
Length = length;
Width = width;
Type = type;
}
/// <summary>
/// Constructs a new Bone object.
/// @since 3.0
@ -75,11 +50,11 @@ namespace Leap
Bone.BoneType type,
Quaternion rotation)
{
PrevJoint = new Vector(prevJoint.x, prevJoint.y, prevJoint.z);
NextJoint = new Vector(nextJoint.x, nextJoint.y, nextJoint.z);
Center = new Vector(center.x, center.y, center.z);
Direction = new Vector(direction.x, direction.y, direction.z);
Rotation = new LeapQuaternion(rotation.x, rotation.y, rotation.z, rotation.w);
PrevJoint = prevJoint;
NextJoint = nextJoint;
Center = center;
Direction = direction;
Rotation = rotation;
Length = length;
Width = width;
Type = type;
@ -111,31 +86,27 @@ namespace Leap
/// In anatomical terms, this is the proximal end of the bone.
/// @since 2.0
/// </summary>
[System.Obsolete("Its type will be changed from Vector to Vector3")]
public Vector PrevJoint;
public Vector3 PrevJoint;
/// <summary>
/// The end of the bone, closest to the finger tip.
/// In anatomical terms, this is the distal end of the bone.
/// @since 2.0
/// </summary>
[System.Obsolete("Its type will be changed from Vector to Vector3")]
public Vector NextJoint;
public Vector3 NextJoint;
/// <summary>
/// The midpoint of the bone.
/// @since 2.0
/// </summary>
[System.Obsolete("Its type will be changed from Vector to Vector3")]
public Vector Center;
public Vector3 Center;
/// <summary>
/// The normalized direction of the bone from base to tip.
/// @since 2.0
/// </summary>
[System.Obsolete("Its type will be changed from Vector to Vector3")]
public Vector Direction;
public Vector3 Direction;
/// <summary>
/// The estimated length of the bone.
@ -159,8 +130,9 @@ namespace Leap
/// The orientation of this Bone as a Quaternion.
/// @since 2.0
/// </summary>
[System.Obsolete("Its type will be changed from LeapQuaternion to UnityEngine.Quaternion")]
public LeapQuaternion Rotation;
public Quaternion Rotation;
LeapTransform _basis = new LeapTransform(Vector3.one, Quaternion.identity);
/// <summary>
/// The orthonormal basis vectors for this Bone as a Matrix.
@ -193,7 +165,16 @@ namespace Leap
///
/// @since 2.0
/// </summary>
public LeapTransform Basis { get { return new LeapTransform(PrevJoint, Rotation); } }
public LeapTransform Basis
{
get
{
_basis.translation = PrevJoint;
_basis.rotation = Rotation;
return _basis;
}
}
/// <summary>
/// Enumerates the type of bones.
@ -210,7 +191,5 @@ namespace Leap
TYPE_INTERMEDIATE = 2,
TYPE_DISTAL = 3
}
#pragma warning restore 0618
}
}