00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __JOINTDATA_H__
00010 #define __JOINTDATA_H__
00011
00012
00013
00014
00015 static const long jointDataInvalidValue = 10000000;
00016
00017 #include "Tools/Streams/InOut.h"
00018
00019
00020
00021
00022
00023 struct JointData
00024 {
00025 public:
00026
00027
00028
00029 enum JointID {
00030 headTilt210,
00031 neckTilt = headTilt210,
00032 headPan210,
00033 headPan = headPan210,
00034 headRoll210,
00035 headTilt = headRoll210,
00036 mouth,
00037 earL, earR,
00038 legFR1, legFR2, legFR3,
00039 legFL1, legFL2, legFL3,
00040 legHR1, legHR2, legHR3,
00041 legHL1, legHL2, legHL3,
00042 tailPan, tailTilt,
00043 numOfJoint
00044 };
00045
00046
00047 long data[numOfJoint];
00048
00049
00050 JointData(long headTiltValue = jointDataInvalidValue,
00051 long headPanValue = jointDataInvalidValue,
00052 long headRollValue = jointDataInvalidValue,
00053 long mouthValue = jointDataInvalidValue,
00054 long earLValue = jointDataInvalidValue,
00055 long earRValue = jointDataInvalidValue,
00056 long legFR1Value = jointDataInvalidValue,
00057 long legFR2Value = jointDataInvalidValue,
00058 long legFR3Value = jointDataInvalidValue,
00059 long legFL1Value = jointDataInvalidValue,
00060 long legFL2Value = jointDataInvalidValue,
00061 long legFL3Value = jointDataInvalidValue,
00062 long legHR1Value = jointDataInvalidValue,
00063 long legHR2Value = jointDataInvalidValue,
00064 long legHR3Value = jointDataInvalidValue,
00065 long legHL1Value = jointDataInvalidValue,
00066 long legHL2Value = jointDataInvalidValue,
00067 long legHL3Value = jointDataInvalidValue,
00068 long tailPanValue = jointDataInvalidValue,
00069 long tailTiltValue = jointDataInvalidValue
00070 );
00071
00072
00073 JointData& operator=(const JointData& other);
00074
00075
00076 JointData(const JointData& other);
00077
00078
00079 static const char* getJointName(JointID joint)
00080 {
00081 switch (joint)
00082 {
00083 case headTilt210: return "neckTilt (headTilt210)";
00084 case headPan210: return "headPan";
00085 case headRoll210: return "headTilt (headRoll210)";
00086 case mouth: return "mouth";
00087 case earL: return "earL";
00088 case earR: return "earR";
00089 case legFR1: return "legFR1";
00090 case legFR2: return "legFR2";
00091 case legFR3: return "legFR3";
00092 case legFL1: return "legFL1";
00093 case legFL2: return "legFL2";
00094 case legFL3: return "legFL3";
00095 case legHR1: return "legHR1";
00096 case legHR2: return "legHR2";
00097 case legHR3: return "legHR3";
00098 case legHL1: return "legHL1";
00099 case legHL2: return "legHL2";
00100 case legHL3: return "legHL3";
00101 case tailPan: return "tailPan";
00102 case tailTilt: return "tailTilt";
00103 default: return "";
00104 }
00105 }
00106
00107 static JointID getIDFromName(const char* jointName);
00108 };
00109
00110
00111
00112
00113
00114
00115
00116
00117 In& operator>>(In& stream,JointData& jointData);
00118
00119
00120
00121
00122
00123
00124
00125 Out& operator<<(Out& stream, const JointData& jointData);
00126
00127 #endif //__JOINTDATA_H__
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208