Skip to content

Instantly share code, notes, and snippets.

@neon-izm
Created September 17, 2018 02:36
Show Gist options
  • Save neon-izm/0637dac7a29682de916cecc0e8b037b0 to your computer and use it in GitHub Desktop.
Save neon-izm/0637dac7a29682de916cecc0e8b037b0 to your computer and use it in GitHub Desktop.
HumanPose.musclesの中身の95個のfloatはこんな感じ。55から94に指の情報が入っている
0 Spine Front-Back
1 Spine Left-Right
2 Spine Twist Left-Right
3 Chest Front-Back
4 Chest Left-Right
5 Chest Twist Left-Right
6 UpperChest Front-Back
7 UpperChest Left-Right
8 UpperChest Twist Left-Right
9 Neck Nod Down-Up
10 Neck Tilt Left-Right
11 Neck Turn Left-Right
12 Head Nod Down-Up
13 Head Tilt Left-Right
14 Head Turn Left-Right
15 Left Eye Down-Up
16 Left Eye In-Out
17 Right Eye Down-Up
18 Right Eye In-Out
19 Jaw Close
20 Jaw Left-Right
21 Left Upper Leg Front-Back
22 Left Upper Leg In-Out
23 Left Upper Leg Twist In-Out
24 Left Lower Leg Stretch
25 Left Lower Leg Twist In-Out
26 Left Foot Up-Down
27 Left Foot Twist In-Out
28 Left Toes Up-Down
29 Right Upper Leg Front-Back
30 Right Upper Leg In-Out
31 Right Upper Leg Twist In-Out
32 Right Lower Leg Stretch
33 Right Lower Leg Twist In-Out
34 Right Foot Up-Down
35 Right Foot Twist In-Out
36 Right Toes Up-Down
37 Left Shoulder Down-Up
38 Left Shoulder Front-Back
39 Left Arm Down-Up
40 Left Arm Front-Back
41 Left Arm Twist In-Out
42 Left Forearm Stretch
43 Left Forearm Twist In-Out
44 Left Hand Down-Up
45 Left Hand In-Out
46 Right Shoulder Down-Up
47 Right Shoulder Front-Back
48 Right Arm Down-Up
49 Right Arm Front-Back
50 Right Arm Twist In-Out
51 Right Forearm Stretch
52 Right Forearm Twist In-Out
53 Right Hand Down-Up
54 Right Hand In-Out
55 Left Thumb 1 Stretched
56 Left Thumb Spread
57 Left Thumb 2 Stretched
58 Left Thumb 3 Stretched
59 Left Index 1 Stretched
60 Left Index Spread
61 Left Index 2 Stretched
62 Left Index 3 Stretched
63 Left Middle 1 Stretched
64 Left Middle Spread
65 Left Middle 2 Stretched
66 Left Middle 3 Stretched
67 Left Ring 1 Stretched
68 Left Ring Spread
69 Left Ring 2 Stretched
70 Left Ring 3 Stretched
71 Left Little 1 Stretched
72 Left Little Spread
73 Left Little 2 Stretched
74 Left Little 3 Stretched
75 Right Thumb 1 Stretched
76 Right Thumb Spread
77 Right Thumb 2 Stretched
78 Right Thumb 3 Stretched
79 Right Index 1 Stretched
80 Right Index Spread
81 Right Index 2 Stretched
82 Right Index 3 Stretched
83 Right Middle 1 Stretched
84 Right Middle Spread
85 Right Middle 2 Stretched
86 Right Middle 3 Stretched
87 Right Ring 1 Stretched
88 Right Ring Spread
89 Right Ring 2 Stretched
90 Right Ring 3 Stretched
91 Right Little 1 Stretched
92 Right Little Spread
93 Right Little 2 Stretched
94 Right Little 3 Stretched
@neon-izm
Copy link
Author

neon-izm commented Apr 4, 2025

こんな感じの辞書を作っておくと、便利

    public static readonly Dictionary<string, HumanBodyBones> BoneNameToHumanBodyBones = new Dictionary<string, HumanBodyBones>
    {
        { "Hips", HumanBodyBones.Hips },
        { "LeftUpperLeg", HumanBodyBones.LeftUpperLeg },
        { "RightUpperLeg", HumanBodyBones.RightUpperLeg },
        { "LeftLowerLeg", HumanBodyBones.LeftLowerLeg },
        { "RightLowerLeg", HumanBodyBones.RightLowerLeg },
        { "LeftFoot", HumanBodyBones.LeftFoot },
        { "RightFoot", HumanBodyBones.RightFoot },
        { "Spine", HumanBodyBones.Spine },
        { "Chest", HumanBodyBones.Chest },
        { "Neck", HumanBodyBones.Neck },
        { "Head", HumanBodyBones.Head },
        { "LeftShoulder", HumanBodyBones.LeftShoulder },
        { "RightShoulder", HumanBodyBones.RightShoulder },
        { "LeftUpperArm", HumanBodyBones.LeftUpperArm },
        { "RightUpperArm", HumanBodyBones.RightUpperArm },
        { "LeftLowerArm", HumanBodyBones.LeftLowerArm },
        { "RightLowerArm", HumanBodyBones.RightLowerArm },
        { "LeftHand", HumanBodyBones.LeftHand },
        { "RightHand", HumanBodyBones.RightHand },
        { "LeftToes", HumanBodyBones.LeftToes },
        { "RightToes", HumanBodyBones.RightToes },
        { "LeftEye", HumanBodyBones.LeftEye },
        { "RightEye", HumanBodyBones.RightEye },
        { "Jaw", HumanBodyBones.Jaw },
        { "Left Thumb Proximal", HumanBodyBones.LeftThumbProximal },
        { "Left Thumb Intermediate", HumanBodyBones.LeftThumbIntermediate },
        { "Left Thumb Distal", HumanBodyBones.LeftThumbDistal },
        { "Left Index Proximal", HumanBodyBones.LeftIndexProximal },
        { "Left Index Intermediate", HumanBodyBones.LeftIndexIntermediate },
        { "Left Index Distal", HumanBodyBones.LeftIndexDistal },
        { "Left Middle Proximal", HumanBodyBones.LeftMiddleProximal },
        { "Left Middle Intermediate", HumanBodyBones.LeftMiddleIntermediate },
        { "Left Middle Distal", HumanBodyBones.LeftMiddleDistal },
        { "Left Ring Proximal", HumanBodyBones.LeftRingProximal },
        { "Left Ring Intermediate", HumanBodyBones.LeftRingIntermediate },
        { "Left Ring Distal", HumanBodyBones.LeftRingDistal },
        { "Left Little Proximal", HumanBodyBones.LeftLittleProximal },
        { "Left Little Intermediate", HumanBodyBones.LeftLittleIntermediate },
        { "Left Little Distal", HumanBodyBones.LeftLittleDistal },
        { "Right Thumb Proximal", HumanBodyBones.RightThumbProximal },
        { "Right Thumb Intermediate", HumanBodyBones.RightThumbIntermediate },
        { "Right Thumb Distal", HumanBodyBones.RightThumbDistal },
        { "Right Index Proximal", HumanBodyBones.RightIndexProximal },
        { "Right Index Intermediate", HumanBodyBones.RightIndexIntermediate },
        { "Right Index Distal", HumanBodyBones.RightIndexDistal },
        { "Right Middle Proximal", HumanBodyBones.RightMiddleProximal },
        { "Right Middle Intermediate", HumanBodyBones.RightMiddleIntermediate },
        { "Right Middle Distal", HumanBodyBones.RightMiddleDistal },
        { "Right Ring Proximal", HumanBodyBones.RightRingProximal },
        { "Right Ring Intermediate", HumanBodyBones.RightRingIntermediate },
        { "Right Ring Distal", HumanBodyBones.RightRingDistal },
        { "Right Little Proximal", HumanBodyBones.RightLittleProximal },
        { "Right Little Intermediate", HumanBodyBones.RightLittleIntermediate },
        { "Right Little Distal", HumanBodyBones.RightLittleDistal },
        { "UpperChest", HumanBodyBones.UpperChest }
    };
    
    
    public static readonly Dictionary<HumanBodyBones, string> HumanBodyBonesToBoneName = new Dictionary<HumanBodyBones, string>
    {
        { HumanBodyBones.Hips, "Hips" },
        { HumanBodyBones.LeftUpperLeg, "LeftUpperLeg" },
        { HumanBodyBones.RightUpperLeg, "RightUpperLeg" },
        { HumanBodyBones.LeftLowerLeg, "LeftLowerLeg" },
        { HumanBodyBones.RightLowerLeg, "RightLowerLeg" },
        { HumanBodyBones.LeftFoot, "LeftFoot" },
        { HumanBodyBones.RightFoot, "RightFoot" },
        { HumanBodyBones.Spine, "Spine" },
        { HumanBodyBones.Chest, "Chest" },
        { HumanBodyBones.Neck, "Neck" },
        { HumanBodyBones.Head, "Head" },
        { HumanBodyBones.LeftShoulder, "LeftShoulder" },
        { HumanBodyBones.RightShoulder, "RightShoulder" },
        { HumanBodyBones.LeftUpperArm, "LeftUpperArm" },
        { HumanBodyBones.RightUpperArm, "RightUpperArm" },
        { HumanBodyBones.LeftLowerArm, "LeftLowerArm" },
        { HumanBodyBones.RightLowerArm, "RightLowerArm" },
        { HumanBodyBones.LeftHand, "LeftHand" },
        { HumanBodyBones.RightHand, "RightHand" },
        { HumanBodyBones.LeftToes, "LeftToes" },
        { HumanBodyBones.RightToes, "RightToes" },
        { HumanBodyBones.LeftEye, "LeftEye" },
        { HumanBodyBones.RightEye, "RightEye" },
        { HumanBodyBones.Jaw, "Jaw" },
        { HumanBodyBones.LeftThumbProximal, "Left Thumb Proximal" },
        { HumanBodyBones.LeftThumbIntermediate, "Left Thumb Intermediate" },
        { HumanBodyBones.LeftThumbDistal, "Left Thumb Distal" },
        { HumanBodyBones.LeftIndexProximal, "Left Index Proximal" },
        { HumanBodyBones.LeftIndexIntermediate, "Left Index Intermediate" },
        { HumanBodyBones.LeftIndexDistal, "Left Index Distal" },
        { HumanBodyBones.LeftMiddleProximal, "Left Middle Proximal" },
        { HumanBodyBones.LeftMiddleIntermediate, "Left Middle Intermediate" },
        { HumanBodyBones.LeftMiddleDistal, "Left Middle Distal" },
        { HumanBodyBones.LeftRingProximal, "Left Ring Proximal" },
        { HumanBodyBones.LeftRingIntermediate, "Left Ring Intermediate" },
        { HumanBodyBones.LeftRingDistal, "Left Ring Distal" },
        { HumanBodyBones.LeftLittleProximal, "Left Little Proximal" },
        { HumanBodyBones.LeftLittleIntermediate, "Left Little Intermediate" },
        { HumanBodyBones.LeftLittleDistal, "Left Little Distal" },
        { HumanBodyBones.RightThumbProximal, "Right Thumb Proximal" },
        { HumanBodyBones.RightThumbIntermediate, "Right Thumb Intermediate" },
        { HumanBodyBones.RightThumbDistal, "Right Thumb Distal" },
        { HumanBodyBones.RightIndexProximal, "Right Index Proximal" },
        { HumanBodyBones.RightIndexIntermediate, "Right Index Intermediate" },
        { HumanBodyBones.RightIndexDistal, "Right Index Distal" },
        { HumanBodyBones.RightMiddleProximal, "Right Middle Proximal" },
        { HumanBodyBones.RightMiddleIntermediate, "Right Middle Intermediate" },
        { HumanBodyBones.RightMiddleDistal, "Right Middle Distal" },
        { HumanBodyBones.RightRingProximal, "Right Ring Proximal" },
        { HumanBodyBones.RightRingIntermediate, "Right Ring Intermediate" },
        { HumanBodyBones.RightRingDistal, "Right Ring Distal" },
        { HumanBodyBones.RightLittleProximal, "Right Little Proximal" },
        { HumanBodyBones.RightLittleIntermediate, "Right Little Intermediate" },
        { HumanBodyBones.RightLittleDistal, "Right Little Distal" },
        { HumanBodyBones.UpperChest, "UpperChest" }
    };
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment