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 * Lampマテリアルユーティリティヘッダ 00022 * @author Junpee 00023 */ 00024 00025 #ifndef LAMP_MATERIAL_UTILITY_H_ 00026 #define LAMP_MATERIAL_UTILITY_H_ 00027 00028 namespace LampForMaya{ 00029 00030 //------------------------------------------------------------------------------ 00031 /** 00032 * Lampマテリアルユーティリティ 00033 */ 00034 class LampMaterialUtility{ 00035 public: 00036 //-------------------------------------------------------------------------- 00037 // テクスチャ 00038 //-------------------------------------------------------------------------- 00039 /** 00040 * テクスチャの取得 00041 * @param node アトリビュートを持つノード 00042 * @param attributeName テクスチャを持つアトリビュート名 00043 * @return テクスチャ 00044 */ 00045 static MObject getTexture( 00046 const MObject& node, const String& attributeName); 00047 00048 /** 00049 * テクスチャ名の取得 00050 * @param node アトリビュートを持つノード 00051 * @param attributeName テクスチャを持つアトリビュート名 00052 * @return テクスチャ名 00053 */ 00054 static String getTextureName( 00055 const MObject& node, const String& attributeName); 00056 00057 //-------------------------------------------------------------------------- 00058 // アトリビュート初期化 00059 //-------------------------------------------------------------------------- 00060 /** 00061 * ベーステクスチャアトリビュートの追加 00062 */ 00063 static void addBaseTextureAttribute(); 00064 00065 /** 00066 * 光沢テクスチャアトリビュートの追加 00067 */ 00068 static void addGlossTextureAttribute(); 00069 00070 /** 00071 * ライトテクスチャアトリビュートの追加 00072 */ 00073 static void addLightTextureAttribute(); 00074 00075 /** 00076 * 汚れテクスチャアトリビュートの追加 00077 */ 00078 static void addStainTextureAttribute(); 00079 00080 /** 00081 * ディフューズアトリビュートの追加 00082 */ 00083 static void addDiffuseAttribute(); 00084 00085 /** 00086 * スペキュラアトリビュートの追加 00087 */ 00088 static void addSpecularAttribute(); 00089 00090 /** 00091 * アンビエントアトリビュートの追加 00092 */ 00093 static void addAmbientAttribute(); 00094 00095 /** 00096 * エミッシブアトリビュートの追加 00097 */ 00098 static void addEmissiveAttribute(); 00099 00100 private: 00101 /** 00102 * コンストラクタ 00103 */ 00104 LampMaterialUtility(); 00105 00106 }; 00107 00108 //------------------------------------------------------------------------------ 00109 } // End of namespace LampForMaya 00110 #endif // End of LAMP_MATERIAL_UTILITY_H_ 00111 //------------------------------------------------------------------------------ 00112