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

BinaryAnimationLoader.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 BINARY_ANIMATION_LOADER_H_
00026 #define BINARY_ANIMATION_LOADER_H_
00027 
00028 namespace Lamp{
00029 
00030 class BinaryReader;
00031 class AnimationManager;
00032 class VectorInterpolator;
00033 class RotationInterpolator;
00034 
00035 //------------------------------------------------------------------------------
00036 /**
00037  * バイナリアニメーションローダ
00038  */
00039 class BinaryAnimationLoader{
00040 public:
00041     /**
00042      * コンストラクタ
00043      */
00044     BinaryAnimationLoader();
00045 
00046     /**
00047      * デストラクタ
00048      */
00049     virtual ~BinaryAnimationLoader();
00050 
00051     //--------------------------------------------------------------------------
00052     // ロード
00053     //--------------------------------------------------------------------------
00054     /**
00055      * ロード
00056      * @param filePath ファイルパス
00057      * @param manager ロード先アニメーションマネージャ
00058      */
00059     virtual void load(const String& filePath, AnimationManager* manager);
00060 
00061     /**
00062      * ロード
00063      * @param binaryReader テキストリーダ
00064      * @param manager ロード先アニメーションマネージャ
00065      */
00066     virtual void load(BinaryReader* binaryReader, AnimationManager* manager);
00067 
00068 protected:
00069     //--------------------------------------------------------------------------
00070     /**
00071      * ヘッダの読み込み
00072      */
00073     virtual void readHeader();
00074 
00075     //--------------------------------------------------------------------------
00076     // アニメーションセット
00077     //--------------------------------------------------------------------------
00078     /**
00079      * アニメーションセットの読み込み
00080      */
00081     virtual void readAnimationSet();
00082 
00083     //--------------------------------------------------------------------------
00084     // カメラ
00085     //--------------------------------------------------------------------------
00086     /**
00087      * カメラアニメーションの読み込み
00088      */
00089     virtual void readCameraAnimation();
00090 
00091     /**
00092      * カメラアニメーションデータの読み込み
00093      */
00094     virtual void readCameraAnimationData();
00095 
00096     //--------------------------------------------------------------------------
00097     // シーンノード
00098     //--------------------------------------------------------------------------
00099     /**
00100      * シーンノードアニメーションの読み込み
00101      */
00102     virtual void readSceneNodeAnimation();
00103 
00104     /**
00105      * シーンノードアニメーションデータの読み込み
00106      */
00107     virtual void readSceneNodeAnimationData();
00108 
00109     //--------------------------------------------------------------------------
00110     // キャラクタモデル
00111     //--------------------------------------------------------------------------
00112     /**
00113      * キャラクタモデルアニメーションの読み込み
00114      */
00115     virtual void readCharacterModelAnimation();
00116 
00117     /**
00118      * キャラクタモデルアニメーションデータの読み込み
00119      */
00120     virtual void readCharacterModelAnimationData();
00121 
00122     //--------------------------------------------------------------------------
00123     // リンク
00124     //--------------------------------------------------------------------------
00125     /**
00126      * アニメーションセットリンクの読み込み
00127      */
00128     virtual void readAnimationSetLink();
00129 
00130     /**
00131      * カメラアニメーションリンクの読み込み
00132      */
00133     virtual void readCameraAnimationLink();
00134 
00135     /**
00136      * シーンノードアニメーションリンクの読み込み
00137      */
00138     virtual void readSceneNodeAnimationLink();
00139 
00140     /**
00141      * キャラクタモデルアニメーションリンクの読み込み
00142      */
00143     virtual void readCharacterModelAnimationLink();
00144 
00145     //--------------------------------------------------------------------------
00146     // ベクトル補間の読み込み
00147     //--------------------------------------------------------------------------
00148     /**
00149      * ベクトル補間の読み込み
00150      * @return ベクトル補間
00151      */
00152     virtual VectorInterpolator* readVectorInterpolator();
00153 
00154     /**
00155      * ベクトル定数補間の読み込み
00156      * @return ベクトル定数補間
00157      */
00158     virtual VectorInterpolator* readVectorConstantInterpolator();
00159 
00160     /**
00161      * ベクトル配列補間の読み込み
00162      * @return ベクトル配列補間
00163      */
00164     virtual VectorInterpolator* readVectorArrayInterpolator();
00165 
00166     /**
00167      * ベクトル線形補間の読み込み
00168      * @return ベクトル線形補間
00169      */
00170     virtual VectorInterpolator* readVectorLinearInterpolator();
00171 
00172     //--------------------------------------------------------------------------
00173     // 回転補間の読み込み
00174     //--------------------------------------------------------------------------
00175     /**
00176      * 回転補間の読み込み
00177      * @return 回転補間
00178      */
00179     virtual RotationInterpolator* readRotationInterpolator();
00180 
00181     /**
00182      * 回転定数補間の読み込み
00183      * @return 回転定数補間
00184      */
00185     virtual RotationInterpolator* readRotationConstantInterpolator();
00186 
00187     /**
00188      * オイラー回転配列補間の読み込み
00189      * @return オイラー回転配列補間
00190      */
00191     virtual RotationInterpolator* readEulerArrayInterpolator();
00192 
00193     /**
00194      * 四元数回転配列補間の読み込み
00195      * @return 四元数回転配列補間
00196      */
00197     virtual RotationInterpolator* readQuaternionArrayInterpolator();
00198 
00199     /**
00200      * 四元数回転線形補間の読み込み
00201      * @return 四元数回転線形補間
00202      */
00203     virtual RotationInterpolator* readQuaternionLinearInterpolator();
00204 
00205     //--------------------------------------------------------------------------
00206     // 値の読み込み
00207     //--------------------------------------------------------------------------
00208     /**
00209      * 文字列の読み込み
00210      * @return 文字列
00211      */
00212     virtual String readString();
00213 
00214     /**
00215      * 三次元ベクトルの読み込み
00216      * @return 三次元ベクトル
00217      */
00218     virtual Vector3 readVector3();
00219 
00220     /**
00221      * 四元数の読み込み
00222      * @return 四元数
00223      */
00224     virtual Quaternion readQuaternion();
00225 
00226     //--------------------------------------------------------------------------
00227     // ユーティリティ
00228     //--------------------------------------------------------------------------
00229     /**
00230      * アライメントを取る
00231      */
00232     virtual void align();
00233 
00234     //--------------------------------------------------------------------------
00235     // メンバ
00236     //--------------------------------------------------------------------------
00237     /// リーダ
00238     BinaryReader* reader_;
00239     /// アニメーションマネージャ
00240     AnimationManager* manager_;
00241 
00242 private:
00243     //--------------------------------------------------------------------------
00244     // コピーコンストラクタの隠蔽
00245     BinaryAnimationLoader(const BinaryAnimationLoader& copy);
00246 
00247     // 代入コピーの隠蔽
00248     void operator =(const BinaryAnimationLoader& copy);
00249 
00250 };
00251 
00252 //------------------------------------------------------------------------------
00253 } // End of namespace Lamp
00254 #endif // End of BINARY_ANIMATION_LOADER_H_
00255 //------------------------------------------------------------------------------

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