Revision 7ed40bef src/server/mouth_motion_generator.cpp
src/server/mouth_motion_generator.cpp | ||
---|---|---|
104 | 104 |
//! \param int enum with joint id |
105 | 105 |
float MouthMotionGenerator::mouthstate_to_opening(MouthState m, int e){ |
106 | 106 |
switch (e){ |
107 |
default: printf("> get_opening(0x%02X): invalid joint enum!\n",e); exit(0);
|
|
108 |
case(JointInterface::ID_LIP_LEFT_UPPER):
|
|
109 |
case(JointInterface::ID_LIP_LEFT_LOWER):
|
|
110 |
return m.opening_left;
|
|
111 |
case(JointInterface::ID_LIP_CENTER_UPPER):
|
|
112 |
case(JointInterface::ID_LIP_CENTER_LOWER):
|
|
113 |
return m.opening_center;
|
|
114 |
case(JointInterface::ID_LIP_RIGHT_UPPER):
|
|
115 |
case(JointInterface::ID_LIP_RIGHT_LOWER):
|
|
116 |
return m.opening_right;
|
|
107 |
default: printf("> get_opening(0x%02X): invalid joint enum!\n",e); exit(0); |
|
108 |
case(JointInterface::ID_LIP_LEFT_UPPER): |
|
109 |
case(JointInterface::ID_LIP_LEFT_LOWER): |
|
110 |
return m.opening_left; |
|
111 |
case(JointInterface::ID_LIP_CENTER_UPPER): |
|
112 |
case(JointInterface::ID_LIP_CENTER_LOWER): |
|
113 |
return m.opening_center; |
|
114 |
case(JointInterface::ID_LIP_RIGHT_UPPER): |
|
115 |
case(JointInterface::ID_LIP_RIGHT_LOWER): |
|
116 |
return m.opening_right; |
|
117 | 117 |
} |
118 | 118 |
} |
119 | 119 |
|
... | ... | |
122 | 122 |
//! \param int enum with joint id |
123 | 123 |
float MouthMotionGenerator::mouthstate_to_position(MouthState m, int e){ |
124 | 124 |
switch (e){ |
125 |
default: printf("> get_position(0x%02X): invalid joint enum!\n",e); exit(0);
|
|
126 |
case(JointInterface::ID_LIP_LEFT_UPPER):
|
|
127 |
case(JointInterface::ID_LIP_LEFT_LOWER):
|
|
128 |
return m.position_left;
|
|
129 |
case(JointInterface::ID_LIP_CENTER_UPPER):
|
|
130 |
case(JointInterface::ID_LIP_CENTER_LOWER):
|
|
131 |
return m.position_center;
|
|
132 |
case(JointInterface::ID_LIP_RIGHT_UPPER):
|
|
133 |
case(JointInterface::ID_LIP_RIGHT_LOWER):
|
|
134 |
return m.position_right;
|
|
125 |
default: printf("> get_position(0x%02X): invalid joint enum!\n",e); exit(0); |
|
126 |
case(JointInterface::ID_LIP_LEFT_UPPER): |
|
127 |
case(JointInterface::ID_LIP_LEFT_LOWER): |
|
128 |
return m.position_left; |
|
129 |
case(JointInterface::ID_LIP_CENTER_UPPER): |
|
130 |
case(JointInterface::ID_LIP_CENTER_LOWER): |
|
131 |
return m.position_center; |
|
132 |
case(JointInterface::ID_LIP_RIGHT_UPPER): |
|
133 |
case(JointInterface::ID_LIP_RIGHT_LOWER): |
|
134 |
return m.position_right; |
|
135 | 135 |
} |
136 | 136 |
} |
137 | 137 |
|
Also available in: Unified diff