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

TranslationLightManager.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_LIGHT_MANAGER_H_
00026 #define TRANSLATION_LIGHT_MANAGER_H_
00027 
00028 #include <Core/Container/HashMap.h>
00029 #include <Core/Container/ArrayList.h>
00030 #include <Translator/Light/TranslationAmbientLight.h>
00031 #include <Translator/Light/TranslationDirectionalLight.h>
00032 #include <Translator/Light/TranslationPointLight.h>
00033 
00034 namespace LampForMaya{
00035 
00036 //------------------------------------------------------------------------------
00037 /**
00038  * 変換ライトマネージャ
00039  */
00040 class TranslationLightManager{
00041 public:
00042     /**
00043      * コンストラクタ
00044      */
00045     TranslationLightManager();
00046 
00047     /**
00048      * デストラクタ
00049      */
00050     virtual ~TranslationLightManager();
00051 
00052     /**
00053      * ライトの収集
00054      * @return 成功すればtrue
00055      */
00056     virtual bool collectLights();
00057 
00058     /**
00059      * Lampへの変換
00060      * @param scene 変換先シーン
00061      * @return 成功すればtrue
00062      */
00063     virtual bool convertToLamp(Scene* scene) const;
00064 
00065     /**
00066      * クリア
00067      * @return 削除したオブジェクト数
00068      */
00069     virtual int clear();
00070 
00071     /**
00072      * ライト数の取得
00073      * @return ライト数
00074      */
00075     virtual int getCount() const{ return array_.getCount(); }
00076 
00077     /**
00078      * ライトの取得
00079      * @param index ライトのインデクス
00080      * @return ライト
00081      */
00082     virtual TranslationLight* get(int index) const{
00083         return array_.get(index);
00084     }
00085 
00086     /**
00087      * ライトの検索
00088      * @param name 検索するライト名
00089      * @return ライト
00090      */
00091     virtual TranslationLight* search(String name) const{
00092         return database_.get(name);
00093     }
00094 
00095 protected:
00096     /**
00097      * ライトの解析
00098      * @param dagPath DAGパス
00099      * @return 成功すればtrue
00100      */
00101     virtual bool analysisLight(const MDagPath& dagPath);
00102 
00103 private:
00104     // コピーコンストラクタの隠蔽
00105     TranslationLightManager(const TranslationLightManager& copy);
00106 
00107     // 代入コピーの隠蔽
00108     void operator =(const TranslationLightManager& copy);
00109 
00110     // ライトデータベース
00111     Lamp::HashMap<String, TranslationLight*> database_;
00112     // ライト配列
00113     ArrayList<TranslationLight*> array_;
00114 
00115 };
00116 
00117 //------------------------------------------------------------------------------
00118 } // End of namespace LampForMaya
00119 #endif // End of TRANSLATION_LIGHT_MANAGER_H_
00120 //------------------------------------------------------------------------------

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