forked from PoseAI/PoseCameraAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPoseAIRigUE4.cs
More file actions
134 lines (119 loc) · 4.86 KB
/
PoseAIRigUE4.cs
File metadata and controls
134 lines (119 loc) · 4.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// 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<float> pelvis;
public List<float> thigh_r;
public List<float> calf_r;
public List<float> foot_r;
public List<float> ball_r;
public List<float> thigh_l;
public List<float> calf_l;
public List<float> foot_l;
public List<float> ball_l;
public List<float> spine_01;
public List<float> spine_02;
public List<float> spine_03;
public List<float> neck_01;
public List<float> head;
public List<float> clavicle_l;
public List<float> upperarm_l;
public List<float> lowerarm_l;
public List<float> clavicle_r;
public List<float> upperarm_r;
public List<float> 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<float> hand_l;
public List<float> lowerarm_twist_01_l;
public List<float> index_01_l;
public List<float> index_02_l;
public List<float> index_03_l;
public List<float> middle_01_l;
public List<float> middle_02_l;
public List<float> middle_03_l;
public List<float> ring_01_l;
public List<float> ring_02_l;
public List<float> ring_03_l;
public List<float> pinky_01_l;
public List<float> pinky_02_l;
public List<float> pinky_03_l;
public List<float> thumb_01_l;
public List<float> thumb_02_l;
public List<float> 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<float> hand_r;
public List<float> lowerarm_twist_01_r;
public List<float> index_01_r;
public List<float> index_02_r;
public List<float> index_03_r;
public List<float> middle_01_r;
public List<float> middle_02_r;
public List<float> middle_03_r;
public List<float> ring_01_r;
public List<float> ring_02_r;
public List<float> ring_03_r;
public List<float> pinky_01_r;
public List<float> pinky_02_r;
public List<float> pinky_03_r;
public List<float> thumb_01_r;
public List<float> thumb_02_r;
public List<float> 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;
}
}
}