Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TextAnimationSaver.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 // Lamp : Open source game middleware
00003 // Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //------------------------------------------------------------------------------
00019 
00020 /** @file
00021  * テキストアニメーションセーバヘッダ
00022  * @author Junpee
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      * @param filePath ファイルパス
00068      * @param manager セーブするアニメーションマネージャ
00069      */
00070     virtual void save(const String& filePath, AnimationManager* manager);
00071 
00072     /**
00073      * セーブ
00074      * @param textWriter テキストライタ
00075      * @param manager セーブするアニメーションマネージャ
00076      */
00077     virtual void save(TextWriter* textWriter, AnimationManager* manager);
00078 
00079 protected:
00080     /**
00081      * ヘッダの書き出し
00082      */
00083     virtual void writeHeader();
00084 
00085     /**
00086      * オブジェクトのカウント
00087      * @return オブジェクト数
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      * @param animation 書き出すアニメーションセット
00107      */
00108     virtual void writeAnimationSet(AnimationSet* animation);
00109 
00110     //--------------------------------------------------------------------------
00111     // カメラ
00112     //--------------------------------------------------------------------------
00113     /**
00114      * カメラアニメーションの書き出し
00115      * @param animation 書き出すカメラアニメーション
00116      */
00117     virtual void writeCameraAnimation(CameraAnimation* animation);
00118 
00119     /**
00120      * カメラアニメーションデータの書き出し
00121      * @param data 書き出すカメラアニメーションデータ
00122      */
00123     virtual void writeCameraAnimationData(CameraAnimationData* data);
00124 
00125     //--------------------------------------------------------------------------
00126     // シーンノード
00127     //--------------------------------------------------------------------------
00128     /**
00129      * シーンノードアニメーションの書き出し
00130      * @param animation 書き出すシーンノードアニメーション
00131      */
00132     virtual void writeSceneNodeAnimation(SceneNodeAnimation* animation);
00133 
00134     /**
00135      * シーンノードアニメーションデータの書き出し
00136      * @param data 書き出すシーンノードアニメーションデータ
00137      */
00138     virtual void writeSceneNodeAnimationData(SceneNodeAnimationData* data);
00139 
00140     //--------------------------------------------------------------------------
00141     // モデル
00142     //--------------------------------------------------------------------------
00143     /**
00144      * キャラクタモデルアニメーションの書き出し
00145      * @param animation 書き出すキャラクタモデルアニメーション
00146      */
00147     virtual void writeCharacterModelAnimation(
00148         CharacterModelAnimation* animation);
00149 
00150     /**
00151      * キャラクタモデルアニメーションデータの書き出し
00152      * @param data 書き出すキャラクタモデルアニメーションデータ
00153      */
00154     virtual void writeCharacterModelAnimationData(
00155         CharacterModelAnimationData* data);
00156 
00157     //--------------------------------------------------------------------------
00158     // リンク
00159     //--------------------------------------------------------------------------
00160     /**
00161      * アニメーションセットリンクの書き出し
00162      * @param animation リンクを書き出すアニメーションセット
00163      */
00164     virtual void writeAnimationSetLink(AnimationSet* animation);
00165 
00166     /**
00167      * カメラアニメーションリンクの書き出し
00168      * @param animation リンクを書き出すカメラアニメーション
00169      */
00170     virtual void writeCameraAnimationLink(CameraAnimation* animation);
00171 
00172     /**
00173      * シーンノードアニメーションリンクの書き出し
00174      * @param animation リンクを書き出すシーンノードアニメーション
00175      */
00176     virtual void writeSceneNodeAnimationLink(SceneNodeAnimation* animation);
00177 
00178     /**
00179      * キャラクタモデルアニメーションリンクの書き出し
00180      * @param animation リンクを書き出すキャラクタモデルアニメーション
00181      */
00182     virtual void writeCharacterModelAnimationLink(
00183         CharacterModelAnimation* animation);
00184 
00185     //--------------------------------------------------------------------------
00186     // ベクトル補間
00187     //--------------------------------------------------------------------------
00188     /**
00189      * ベクトル補間の書き出し
00190      * @param interpolator ベクトル補間
00191      * @param name 名前
00192      * @param tabDepth タブ深度
00193      */
00194     virtual void writeVectorInterpolator(
00195         VectorInterpolator* interpolator,
00196         const String& name, const String& tabDepth);
00197 
00198     /**
00199      * ベクトル定数補間の書き出し
00200      * @param interpolator ベクトル定数補間
00201      * @param name 名前
00202      * @param tabDepth タブ深度
00203      */
00204     virtual void writeVectorConstantInterpolator(
00205         VectorConstantInterpolator* interpolator,
00206         const String& name, const String& tabDepth);
00207 
00208     /**
00209      * ベクトル配列補間の書き出し
00210      * @param interpolator ベクトル配列補間
00211      * @param name 名前
00212      * @param tabDepth タブ深度
00213      */
00214     virtual void writeVectorArrayInterpolator(
00215         VectorArrayInterpolator* interpolator,
00216         const String& name, const String& tabDepth);
00217 
00218     /**
00219      * ベクトル線形補間の書き出し
00220      * @param interpolator ベクトル線形補間
00221      * @param name 名前
00222      * @param tabDepth タブ深度
00223      */
00224     virtual void writeVectorLinearInterpolator(
00225         VectorLinearInterpolator* interpolator,
00226         const String& name, const String& tabDepth);
00227 
00228     //--------------------------------------------------------------------------
00229     // 回転補間
00230     //--------------------------------------------------------------------------
00231     /**
00232      * 回転補間の書き出し
00233      * @param interpolator 回転補間
00234      * @param name 名前
00235      * @param tabDepth タブ深度
00236      */
00237     virtual void writeRotationInterpolator(
00238         RotationInterpolator* interpolator,
00239         const String& name, const String& tabDepth);
00240 
00241     /**
00242      * 回転定数補間の書き出し
00243      * @param interpolator 回転定数補間
00244      * @param name 名前
00245      * @param tabDepth タブ深度
00246      */
00247     virtual void writeRotationConstantInterpolator(
00248         RotationConstantInterpolator* interpolator,
00249         const String& name, const String& tabDepth);
00250 
00251     /**
00252      * オイラー回転配列補間の書き出し
00253      * @param interpolator オイラー回転配列補間
00254      * @param name 名前
00255      * @param tabDepth タブ深度
00256      */
00257     virtual void writeEulerArrayInterpolator(
00258         EulerArrayInterpolator* interpolator,
00259         const String& name, const String& tabDepth);
00260 
00261     /**
00262      * 四元数回転配列補間の書き出し
00263      * @param interpolator 四元数回転配列補間
00264      * @param name 名前
00265      * @param tabDepth タブ深度
00266      */
00267     virtual void writeQuaternionArrayInterpolator(
00268         QuaternionArrayInterpolator* interpolator,
00269         const String& name, const String& tabDepth);
00270 
00271     /**
00272      * 四元数回転線形補間の書き出し
00273      * @param interpolator 四元数回転線形補間
00274      * @param name 名前
00275      * @param tabDepth タブ深度
00276      */
00277     virtual void writeQuaternionLinearInterpolator(
00278         QuaternionLinearInterpolator* interpolator,
00279         const String& name, const String& tabDepth);
00280 
00281     //--------------------------------------------------------------------------
00282     // ユーティリティ
00283     //--------------------------------------------------------------------------
00284     /**
00285      * boolの書き出し
00286      */
00287     virtual void writeBool(bool);
00288 
00289     /**
00290      * 線コメントの書き出し
00291      */
00292     virtual void writeLineComment();
00293 
00294     /**
00295      * ブロックコメントの書き出し
00296      * @param blockName ブロック名
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 } // End of namespace Lamp
00336 #endif // End of TEXT_ANIMATION_SAVER_H_
00337 //------------------------------------------------------------------------------

Generated on Wed Mar 16 10:29:37 2005 for Lamp by doxygen 1.3.2