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

TranslationSceneNodeManager.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_SCENE_NODE_MANAGER_H_
00026 #define TRANSLATION_SCENE_NODE_MANAGER_H_
00027 
00028 #include <Core/Container/HashMap.h>
00029 #include <Core/Container/ArrayList.h>
00030 #include <Translator/SceneNode/TranslationSceneNode.h>
00031 
00032 namespace LampForMaya{
00033 
00034 class TranslationModelManager;
00035 
00036 //------------------------------------------------------------------------------
00037 /**
00038  * 変換シーンノードマネージャ
00039  */
00040 class TranslationSceneNodeManager{
00041 public:
00042     /**
00043      * コンストラクタ
00044      */
00045     TranslationSceneNodeManager();
00046 
00047     /**
00048      * デストラクタ
00049      */
00050     virtual ~TranslationSceneNodeManager();
00051 
00052     /**
00053      * シーンノードの収集
00054      * @return 成功すればtrue
00055      */
00056     virtual bool collectSceneNodes();
00057 
00058     /**
00059      * ピボットのコンパイル
00060      * @param modelManager モデルマネージャ
00061      * @return 成功すればtrue
00062      */
00063     virtual bool compilePivot(TranslationModelManager* modelManager);
00064 
00065     /**
00066      * アニメーションの収集
00067      * @return 成功すればtrue
00068      */
00069     virtual bool collectAnimations();
00070 
00071     /**
00072      * Lampへの変換
00073      * @param scene 変換先シーン
00074      * @return 成功すればtrue
00075      */
00076     virtual bool convertToLamp(Scene* scene) const;
00077 
00078     /**
00079      * アニメーションの変換
00080      * @param animationManager アニメーションマネージャ
00081      * @param animationSet アニメーションセット
00082      * @return 成功すればtrue
00083      */
00084     virtual bool convertAnimation(
00085         AnimationManager* animationManager, AnimationSet* animationSet);
00086 
00087     /**
00088      * クリア
00089      * @return 削除したオブジェクト数
00090      */
00091     virtual int clear();
00092 
00093     /**
00094      * シーンノード数の取得
00095      * @return シーンノード数
00096      */
00097     virtual int getCount() const{ return array_.getCount(); }
00098 
00099     /**
00100      * シーンノードの取得
00101      * @param index シーンノードのインデクス
00102      * @return シーンノード
00103      */
00104     virtual TranslationSceneNode* get(int index) const{
00105         return array_.get(index);
00106     }
00107 
00108     /**
00109      * シーンノードの検索
00110      * @param name 検索するシーンノード名
00111      * @return シーンノード
00112      */
00113     virtual TranslationSceneNode* search(String name) const{
00114         return database_.get(name);
00115     }
00116 
00117     /**
00118      * 有効Dagノードチェック
00119      * @param dagPath Dagパス
00120      * @return 有効なDagノードならtrue
00121      */
00122     static bool checkValidDagNode(const MDagPath& dagPath);
00123 
00124 protected:
00125     /**
00126      * シーンノードの解析
00127      * @param dagPath DAGパス
00128      */
00129     virtual bool analysisSceneNode(MDagPath dagPath);
00130 
00131 private:
00132     // コピーコンストラクタの隠蔽
00133     TranslationSceneNodeManager(const TranslationSceneNodeManager& copy);
00134 
00135     // 代入コピーの隠蔽
00136     void operator =(const TranslationSceneNodeManager& copy);
00137 
00138     // シーンノードデータベース
00139     Lamp::HashMap<String, TranslationSceneNode*> database_;
00140     // シーンノード配列
00141     ArrayList<TranslationSceneNode*> array_;
00142 
00143 };
00144 
00145 //------------------------------------------------------------------------------
00146 } // End of namespace LampForMaya
00147 #endif // End of TRANSLATION_SCENE_NODE_MANAGER_H_
00148 //------------------------------------------------------------------------------

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