forked from PoseAI/PoseCameraAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPoseAIRigMixamo.cs
More file actions
133 lines (118 loc) · 4.96 KB
/
PoseAIRigMixamo.cs
File metadata and controls
133 lines (118 loc) · 4.96 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
133
// Copyright 2021 Pose AI Ltd. All rights reserved
using UnityEngine;
using System.Collections.Generic;
namespace PoseAI
{
[System.Serializable]
public class PoseAIRigMixamo : PoseAIRigBase
{
public PoseAIRigMixamo() : 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<float> Hips;
public List<float> RightUpLeg;
public List<float> RightLeg;
public List<float> RightFoot;
public List<float> RightToeBase;
public List<float> LeftUpLeg;
public List<float> LeftLeg;
public List<float> LeftFoot;
public List<float> LeftToeBase;
public List<float> Spine;
public List<float> Spine1;
public List<float> Spine2;
public List<float> Neck;
public List<float> Head;
public List<float> LeftShoulder;
public List<float> LeftArm;
public List<float> LeftForeArm;
public List<float> RightShoulder;
public List<float> RightArm;
public List<float> RightForeArm;
}
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> LeftHand;
public List<float> LeftForeArmTwist;
public List<float> LeftHandIndex1;
public List<float> LeftHandIndex2;
public List<float> LeftHandIndex3;
public List<float> LeftHandMiddle1;
public List<float> LeftHandMiddle2;
public List<float> LeftHandMiddle3;
public List<float> LeftHandRing1;
public List<float> LeftHandRing2;
public List<float> LeftHandRing3;
public List<float> LeftHandPinky1;
public List<float> LeftHandPinky2;
public List<float> LeftHandPinky3;
public List<float> LeftHandThumb1;
public List<float> LeftHandThumb2;
public List<float> LeftHandThumb3;
}
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> RightHand;
public List<float> RightForeArmTwist;
public List<float> RightHandIndex1;
public List<float> RightHandIndex2;
public List<float> RightHandIndex3;
public List<float> RightHandMiddle1;
public List<float> RightHandMiddle2;
public List<float> RightHandMiddle3;
public List<float> RightHandRing1;
public List<float> RightHandRing2;
public List<float> RightHandRing3;
public List<float> RightHandPinky1;
public List<float> RightHandPinky2;
public List<float> RightHandPinky3;
public List<float> RightHandThumb1;
public List<float> RightHandThumb2;
public List<float> RightHandThumb3;
}
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;
}
}
}