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 TEX_COORD_H_ 00026 #define TEX_COORD_H_ 00027 00028 namespace Lamp{ 00029 00030 //------------------------------------------------------------------------------ 00031 /** 00032 * テクスチャ座標 00033 */ 00034 class TexCoord{ 00035 public: 00036 /// 最大テクスチャ座標セット数 00037 static const int maxSetCount = 8; 00038 00039 /// テクスチャ座標タイプ 00040 enum Type{ 00041 typeNone = 0, 00042 type1 = 1, 00043 type2 = 2, 00044 type3 = 3, 00045 type4 = 4, 00046 typeMax, 00047 }; 00048 00049 /** 00050 * テクスチャ座標タイプから文字列への変換 00051 * @param texCoordType テクスチャ座標タイプ 00052 * @return テクスチャ座標タイプ文字列 00053 */ 00054 static String texCoordTypeToString(Type texCoordType); 00055 00056 /** 00057 * 文字列からテクスチャ座標タイプへの変換 00058 * @param texCoordTypeString テクスチャ座標タイプ文字列 00059 * @return テクスチャ座標タイプ 00060 */ 00061 static Type texCoordTypeFromString(const String& texCoordTypeString); 00062 00063 00064 private: 00065 // コンストラクタの隠蔽 00066 TexCoord(); 00067 00068 // テクスチャ座標タイプ文字列テーブル 00069 static const String texCoordTypeStringTable[]; 00070 00071 }; 00072 00073 //------------------------------------------------------------------------------ 00074 } // End of namespace Lamp 00075 #endif // End of TEX_COORD_H_ 00076 //------------------------------------------------------------------------------