// Copyright 2021 Pose AI Ltd. All rights reserved using UnityEngine; using System.Collections.Generic; namespace PoseAI { [System.Serializable] public class PoseAIRigUE4 : PoseAIRigBase { // set to 180 degree rotation around Z based on how a test Unreal rig imported public PoseAIRigUE4():base(new Quaternion(0.0f, 0.0f, 1.0f, 0.0f)){} [System.Serializable] public class BodyWrapper : BaseBodyWrapper { [System.Serializable] public class RotationsWrapper : BaseRotationsWrapper { // Rig specific field names go here public List pelvis; public List thigh_r; public List calf_r; public List foot_r; public List ball_r; public List thigh_l; public List calf_l; public List foot_l; public List ball_l; public List spine_01; public List spine_02; public List spine_03; public List neck_01; public List head; public List clavicle_l; public List upperarm_l; public List lowerarm_l; public List clavicle_r; public List upperarm_r; public List lowerarm_r; } 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 hand_l; public List lowerarm_twist_01_l; public List index_01_l; public List index_02_l; public List index_03_l; public List middle_01_l; public List middle_02_l; public List middle_03_l; public List ring_01_l; public List ring_02_l; public List ring_03_l; public List pinky_01_l; public List pinky_02_l; public List pinky_03_l; public List thumb_01_l; public List thumb_02_l; public List thumb_03_l; } 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 hand_r; public List lowerarm_twist_01_r; public List index_01_r; public List index_02_r; public List index_03_r; public List middle_01_r; public List middle_02_r; public List middle_03_r; public List ring_01_r; public List ring_02_r; public List ring_03_r; public List pinky_01_r; public List pinky_02_r; public List pinky_03_r; public List thumb_01_r; public List thumb_02_r; public List thumb_03_r; } 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; } } }