00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef TEXT_ANIMATION_SAVER_H_
00026 #define TEXT_ANIMATION_SAVER_H_
00027
00028 namespace Lamp{
00029
00030 class TextWriter;
00031 class AnimationManager;
00032 class VectorInterpolator;
00033 class VectorConstantInterpolator;
00034 class VectorArrayInterpolator;
00035 class VectorLinearInterpolator;
00036 class RotationInterpolator;
00037 class RotationConstantInterpolator;
00038 class EulerArrayInterpolator;
00039 class QuaternionArrayInterpolator;
00040 class QuaternionLinearInterpolator;
00041 class AnimationSet;
00042 class CameraAnimation;
00043 class CameraAnimationData;
00044 class SceneNodeAnimation;
00045 class SceneNodeAnimationData;
00046 class CharacterModelAnimation;
00047 class CharacterModelAnimationData;
00048
00049
00050
00051
00052
00053 class TextAnimationSaver{
00054 public:
00055
00056
00057
00058 TextAnimationSaver();
00059
00060
00061
00062
00063 virtual ~TextAnimationSaver();
00064
00065
00066
00067
00068
00069
00070 virtual void save(const String& filePath, AnimationManager* manager);
00071
00072
00073
00074
00075
00076
00077 virtual void save(TextWriter* textWriter, AnimationManager* manager);
00078
00079 protected:
00080
00081
00082
00083 virtual void writeHeader();
00084
00085
00086
00087
00088
00089 virtual int countObjects();
00090
00091
00092
00093
00094 virtual void writeAnimationList();
00095
00096
00097
00098
00099 virtual void writeLink();
00100
00101
00102
00103
00104
00105
00106
00107
00108 virtual void writeAnimationSet(AnimationSet* animation);
00109
00110
00111
00112
00113
00114
00115
00116
00117 virtual void writeCameraAnimation(CameraAnimation* animation);
00118
00119
00120
00121
00122
00123 virtual void writeCameraAnimationData(CameraAnimationData* data);
00124
00125
00126
00127
00128
00129
00130
00131
00132 virtual void writeSceneNodeAnimation(SceneNodeAnimation* animation);
00133
00134
00135
00136
00137
00138 virtual void writeSceneNodeAnimationData(SceneNodeAnimationData* data);
00139
00140
00141
00142
00143
00144
00145
00146
00147 virtual void writeCharacterModelAnimation(
00148 CharacterModelAnimation* animation);
00149
00150
00151
00152
00153
00154 virtual void writeCharacterModelAnimationData(
00155 CharacterModelAnimationData* data);
00156
00157
00158
00159
00160
00161
00162
00163
00164 virtual void writeAnimationSetLink(AnimationSet* animation);
00165
00166
00167
00168
00169
00170 virtual void writeCameraAnimationLink(CameraAnimation* animation);
00171
00172
00173
00174
00175
00176 virtual void writeSceneNodeAnimationLink(SceneNodeAnimation* animation);
00177
00178
00179
00180
00181
00182 virtual void writeCharacterModelAnimationLink(
00183 CharacterModelAnimation* animation);
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194 virtual void writeVectorInterpolator(
00195 VectorInterpolator* interpolator,
00196 const String& name, const String& tabDepth);
00197
00198
00199
00200
00201
00202
00203
00204 virtual void writeVectorConstantInterpolator(
00205 VectorConstantInterpolator* interpolator,
00206 const String& name, const String& tabDepth);
00207
00208
00209
00210
00211
00212
00213
00214 virtual void writeVectorArrayInterpolator(
00215 VectorArrayInterpolator* interpolator,
00216 const String& name, const String& tabDepth);
00217
00218
00219
00220
00221
00222
00223
00224 virtual void writeVectorLinearInterpolator(
00225 VectorLinearInterpolator* interpolator,
00226 const String& name, const String& tabDepth);
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237 virtual void writeRotationInterpolator(
00238 RotationInterpolator* interpolator,
00239 const String& name, const String& tabDepth);
00240
00241
00242
00243
00244
00245
00246
00247 virtual void writeRotationConstantInterpolator(
00248 RotationConstantInterpolator* interpolator,
00249 const String& name, const String& tabDepth);
00250
00251
00252
00253
00254
00255
00256
00257 virtual void writeEulerArrayInterpolator(
00258 EulerArrayInterpolator* interpolator,
00259 const String& name, const String& tabDepth);
00260
00261
00262
00263
00264
00265
00266
00267 virtual void writeQuaternionArrayInterpolator(
00268 QuaternionArrayInterpolator* interpolator,
00269 const String& name, const String& tabDepth);
00270
00271
00272
00273
00274
00275
00276
00277 virtual void writeQuaternionLinearInterpolator(
00278 QuaternionLinearInterpolator* interpolator,
00279 const String& name, const String& tabDepth);
00280
00281
00282
00283
00284
00285
00286
00287 virtual void writeBool(bool);
00288
00289
00290
00291
00292 virtual void writeLineComment();
00293
00294
00295
00296
00297
00298 virtual void writeBlockComment(const String& blockName);
00299
00300
00301 TextWriter* writer_;
00302
00303 AnimationManager* manager_;
00304
00305
00306 int animationCount_;
00307
00308 int animationSetCount_;
00309
00310 int cameraCount_;
00311
00312 int sceneNodeCount_;
00313
00314 int characterModelCount_;
00315
00316
00317 int animationDataCount_;
00318
00319 int cameraDataCount_;
00320
00321 int sceneNodeDataCount_;
00322
00323 int characterModelDataCount_;
00324
00325 private:
00326
00327 TextAnimationSaver(const TextAnimationSaver& copy);
00328
00329
00330 void operator =(const TextAnimationSaver& copy);
00331
00332 };
00333
00334
00335 }
00336 #endif // End of TEXT_ANIMATION_SAVER_H_
00337