// Copyright 2021 Pose AI Ltd. All rights reserved using UnityEngine; using System.Collections.Generic; namespace PoseAI { [System.Serializable] public class PoseAIRigUnity : PoseAIRigBase { public PoseAIRigUnity() : base(new Quaternion(0.0f, 0.7071f, 0.7071f, 0.0f)){} [System.Serializable] public class BodyWrapper : BaseBodyWrapper { [System.Serializable] public class RotationsWrapper : BaseRotationsWrapper { // Rig specific field names go here public List Hips; public List Right_UpperLeg; public List Right_LowerLeg; public List Right_Foot; public List Right_Toes; public List Left_UpperLeg; public List Left_LowerLeg; public List Left_Foot; public List Left_Toes; public List Spine; public List Chest; public List UpperChest; public List Neck; public List Head; public List Left_Shoulder; public List Left_UpperArm; public List Left_LowerArm; public List Right_Shoulder; public List Right_UpperArm; public List Right_LowerArm; } public RotationsWrapper Rotations = new RotationsWrapper(); } [System.Serializable] public class LeftHandWrapper : BaseHandWrapper { [System.Serializable] public class RotationsWrapper : BaseRotationsWrapper { // Rig specific field names go here public List Left_Hand; public List Left_LowerArm_Twist; public List Left_IndexProximal; public List Left_IndexIntermediate; public List Left_IndexDistal; public List Left_MiddleProximal; public List Left_MiddleIntermediate; public List Left_MiddleDistal; public List Left_RingProximal; public List Left_RingIntermediate; public List Left_RingDistal; public List Left_PinkyProximal; public List Left_PinkyIntermediate; public List Left_PinkyDistal; public List Left_ThumbProximal; public List Left_ThumbIntermediate; public List Left_ThumbDistal; } public RotationsWrapper Rotations = new RotationsWrapper(); } [System.Serializable] public class RightHandWrapper : BaseHandWrapper { [System.Serializable] public class RotationsWrapper : BaseRotationsWrapper { // Rig specific field names go here public List Right_Hand; public List Right_LowerArm_Twist; public List Right_IndexProximal; public List Right_IndexIntermediate; public List Right_IndexDistal; public List Right_MiddleProximal; public List Right_MiddleIntermediate; public List Right_MiddleDistal; public List Right_RingProximal; public List Right_RingIntermediate; public List Right_RingDistal; public List Right_PinkyProximal; public List Right_PinkyIntermediate; public List Right_PinkyDistal; public List Right_ThumbProximal; public List Right_ThumbIntermediate; public List Right_ThumbDistal; } public RotationsWrapper Rotations = new RotationsWrapper(); } public BodyWrapper Body = new BodyWrapper(); public LeftHandWrapper LeftHand = new LeftHandWrapper(); public RightHandWrapper RightHand = new RightHandWrapper(); protected internal override void BuildListsFromIntrospection(){ Body.Rotations.AddFields(rotationData, rotationNames); LeftHand.Rotations.AddFields(rotationData, rotationNames); RightHand.Rotations.AddFields(rotationData, rotationNames); numOfBodyJoints = Body.Rotations.NumOfJoints(); numOfLeftHandJoints = LeftHand.Rotations.NumOfJoints(); numOfRightHandJoints = RightHand.Rotations.NumOfJoints(); } public override BaseBodyWrapper GetBody() { return Body; } public override BaseHandWrapper GetLeftHand() { return LeftHand; } public override BaseHandWrapper GetRightHand() { return RightHand; } } }