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

TranslationCharacterModel.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 TRANSLATION_CHARACTER_MODEL_H_
00026 #define TRANSLATION_CHARACTER_MODEL_H_
00027 
00028 #include <Translator/Model/TranslationModel.h>
00029 #include <Translator/Animation/TranslationSequence.h>
00030 
00031 namespace LampForMaya{
00032 
00033 class TranslationBone;
00034 class TranslationCharacterMesh;
00035 
00036 //------------------------------------------------------------------------------
00037 /**
00038  * 変換キャラクタモデル
00039  */
00040 class TranslationCharacterModel : public TranslationModel{
00041 friend class TranslationModelManager;
00042 public:
00043     /**
00044      * デストラクタ
00045      */
00046     virtual ~TranslationCharacterModel();
00047 
00048     /**
00049      * キャラクタモデルかどうか
00050      * @return キャラクタモデルならtrue
00051      */
00052     virtual bool isCharacterModel() const{ return true; }
00053 
00054     //--------------------------------------------------------------------------
00055     /**
00056      * 分析
00057      * @param meshManager メッシュマネージャ
00058      * @return 成功すればtrue
00059      */
00060     virtual bool analyze(TranslationMeshManager* meshManager);
00061 
00062     /**
00063      * アニメーションの分析
00064      * @return 成功すればtrue
00065      */
00066     virtual bool analyzeAnimation();
00067 
00068     //--------------------------------------------------------------------------
00069     /**
00070      * Lampへの変換
00071      * @param scene シーン
00072      * @return 成功すればtrue
00073      */
00074     virtual bool convertToLamp(Scene* scene);
00075 
00076     /**
00077      * アニメーションの変換
00078      * @param animationManager アニメーションマネージャ
00079      * @param animationSet アニメーションセット
00080      * @return 成功すればtrue
00081      */
00082     virtual bool convertAnimation(
00083         AnimationManager* animationManager, AnimationSet* animationSet);
00084 
00085     //--------------------------------------------------------------------------
00086     /**
00087      * 変換ボーンの検索
00088      * @param boneName ボーン名
00089      * @return ボーン
00090      */
00091     virtual TranslationBone* searchBone(const String& boneName);
00092 
00093 protected:
00094     /**
00095      * コンストラクタ
00096      * @param initializeObject 初期化するオブジェクト
00097      * @param initializeName 初期化する名前
00098      * @param skinClusterObject スキンクラスタオブジェクト
00099      */
00100     TranslationCharacterModel(
00101         const MObject& initializeObject, const String& initializeName,
00102         const MObject& skinClusterObject);
00103 
00104     /**
00105      * ボーンのアナライズ
00106      * @return 成功すればtrue
00107      */
00108     virtual bool analyzeBone();
00109 
00110     /**
00111      * メッシュのアナライズ
00112      * @param meshManager メッシュマネージャ
00113      * @return 成功すればtrue
00114      */
00115     virtual bool analyzeMesh(TranslationMeshManager* meshManager);
00116 
00117     /**
00118      * ウェイトのアナライズ
00119      * @return 成功すればtrue
00120      */
00121     virtual bool analyzeWeight();
00122 
00123 private:
00124     // コピーコンストラクタの隠蔽
00125     TranslationCharacterModel(const TranslationCharacterModel& copy);
00126 
00127     // 代入コピーの隠蔽
00128     void operator =(const TranslationCharacterModel& copy);
00129 
00130     // スキンクラスタオブジェクト
00131     MObject skinClusterObject_;
00132     // スキンクラスタ
00133     MFnSkinCluster skinCluster_;
00134     // 変換ボーン配列
00135     TranslationBone* transBones_;
00136     // 変換ボーン数
00137     int transBoneCount_;
00138     // 変換メッシュ数
00139     int transMeshCount_;
00140     // 変換メッシュ配列
00141     TranslationCharacterMesh** transMeshes_;
00142 
00143     /// シーケンス
00144     TranslationSequence sequence_;
00145 
00146 };
00147 
00148 //------------------------------------------------------------------------------
00149 } // End of namespace LampForMaya
00150 #endif // End of TRANSLATION_CHARACTER_MODEL_H_
00151 //------------------------------------------------------------------------------
00152 

Generated on Wed Mar 16 10:29:55 2005 for LampForMaya by doxygen 1.3.2