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_TEXTURE_H_ 00026 #define TRANSLATION_TEXTURE_H_ 00027 00028 namespace Lamp{ 00029 class Scene; 00030 } 00031 00032 namespace LampForMaya{ 00033 00034 //------------------------------------------------------------------------------ 00035 /** 00036 * 変換テクスチャ 00037 */ 00038 class TranslationTexture{ 00039 friend class TranslationTextureManager; 00040 public: 00041 /** 00042 * デストラクタ 00043 */ 00044 virtual ~TranslationTexture(); 00045 00046 /** 00047 * 分析 00048 * @return 成功すればtrue 00049 */ 00050 virtual bool analyze(); 00051 00052 /** 00053 * Lampへの変換 00054 * @param scene シーン 00055 * @return 成功すればtrue 00056 */ 00057 virtual bool convertToLamp(Scene* scene); 00058 00059 /** 00060 * ピクチャパスの取得 00061 * @return ピクチャパス 00062 */ 00063 virtual String getPicturePath() const{ return picturePath_; } 00064 00065 /** 00066 * ピクチャ名の取得 00067 * @return ピクチャ名 00068 */ 00069 virtual String getPictureName() const{ return pictureName_; } 00070 00071 private: 00072 /** 00073 * コンストラクタ 00074 * @param initializeObject 初期化するオブジェクト 00075 * @param initializeName 初期化する名前 00076 */ 00077 TranslationTexture( 00078 const MObject& initializeObject, const String& initializeName); 00079 00080 // コピーコンストラクタの隠蔽 00081 TranslationTexture(const TranslationTexture& copy); 00082 00083 // 代入コピーの隠蔽 00084 void operator =(const TranslationTexture& copy); 00085 00086 // オブジェクト 00087 MObject object_; 00088 // 名前 00089 String name_; 00090 // ピクチャパス 00091 String picturePath_; 00092 // ピクチャ名 00093 String pictureName_; 00094 // ミラーU 00095 bool mirrorU_; 00096 // ミラーV 00097 bool mirrorV_; 00098 // ラップU 00099 bool wrapU_; 00100 // ラップV 00101 bool wrapV_; 00102 // リピートUV 00103 TexCoord2 repeatUV_; 00104 // オフセットUV 00105 TexCoord2 offsetUV_; 00106 00107 }; 00108 00109 //------------------------------------------------------------------------------ 00110 } // End of namespace LampForMaya 00111 #endif // End of TRANSLATION_TEXTURE_H_ 00112 //------------------------------------------------------------------------------ 00113