Overte C++ Documentation
BlendshapeConstants.h
1 //
2 // BlendshapeConstants.h
3 //
4 //
5 // Created by Clement on 1/23/15.
6 // Copyright 2015 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_BlendshapeConstants_h
13 #define hifi_BlendshapeConstants_h
14 
15 #include <QHash>
16 #include <QString>
17 
18 #include <glm/glm.hpp>
19 
21 extern const char* BLENDSHAPE_NAMES[];
22 extern const QHash<QString, int> BLENDSHAPE_LOOKUP_MAP;
23 extern const QHash<QString, QPair<QString, float>> READYPLAYERME_BLENDSHAPES_MAP;
24 
25 enum class Blendshapes : int {
26  EyeBlink_L = 0,
27  EyeBlink_R,
28  EyeSquint_L,
29  EyeSquint_R,
30  EyeDown_L,
31  EyeDown_R,
32  EyeIn_L,
33  EyeIn_R,
34  EyeOpen_L,
35  EyeOpen_R,
36  EyeOut_L,
37  EyeOut_R,
38  EyeUp_L,
39  EyeUp_R,
40  BrowsD_L,
41  BrowsD_R,
42  BrowsU_C,
43  BrowsU_L,
44  BrowsU_R,
45  JawFwd,
46  JawLeft,
47  JawOpen,
48  JawRight,
49  MouthLeft,
50  MouthRight,
51  MouthFrown_L,
52  MouthFrown_R,
53  MouthSmile_L,
54  MouthSmile_R,
55  MouthDimple_L,
56  MouthDimple_R,
57  LipsStretch_L,
58  LipsStretch_R,
59  LipsUpperClose,
60  LipsLowerClose,
61  LipsFunnel,
62  LipsPucker,
63  Puff,
64  CheekSquint_L,
65  CheekSquint_R,
66  MouthClose,
67  MouthUpperUp_L,
68  MouthUpperUp_R,
69  MouthLowerDown_L,
70  MouthLowerDown_R,
71  MouthPress_L,
72  MouthPress_R,
73  MouthShrugLower,
74  MouthShrugUpper,
75  NoseSneer_L,
76  NoseSneer_R,
77  TongueOut,
78  UserBlendshape0,
79  UserBlendshape1,
80  UserBlendshape2,
81  UserBlendshape3,
82  UserBlendshape4,
83  UserBlendshape5,
84  UserBlendshape6,
85  UserBlendshape7,
86  UserBlendshape8,
87  UserBlendshape9,
88  BlendshapeCount
89 };
90 
91 // Original blendshapes were per Faceshift.
92 
93 // NEW in ARKit
94 // * MouthClose
95 // * MouthUpperUp_L
96 // * MouthUpperUp_R
97 // * MouthLowerDown_L
98 // * MouthLowerDown_R
99 // * MouthPress_L
100 // * MouthPress_R
101 // * MouthShrugLower
102 // * MouthShrugUpper
103 // * NoseSneer_L
104 // * NoseSneer_R
105 // * TongueOut
106 
107 // Legacy shapes
108 // * JawChew (not in ARKit)
109 // * LipsUpperUp (split in ARKit)
110 // * LipsLowerDown (split in ARKit)
111 // * Sneer (split in ARKit)
112 // * ChinLowerRaise (not in ARKit)
113 // * ChinUpperRaise (not in ARKit)
114 // * LipsUpperOpen (not in ARKit)
115 // * LipsLowerOpen (not in ARKit)
116 
117 struct BlendshapeOffsetPacked {
118  glm::uvec4 packedPosNorTan;
119 };
120 
121 struct BlendshapeOffsetUnpacked {
122  glm::vec3 positionOffset;
123  glm::vec3 normalOffset;
124  glm::vec3 tangentOffset;
125 };
126 
127 using BlendshapeOffset = BlendshapeOffsetPacked;
128 
129 #endif // hifi_BlendshapeConstants_h