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

LampTranslator.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  * Lampトランスレータヘッダ
00022  * @author Junpee
00023  */
00024 
00025 #ifndef LAMP_TRANSLATOR_H_
00026 #define LAMP_TRANSLATOR_H_
00027 
00028 namespace Lamp{
00029     class Scene;
00030     class AnimationManager;
00031     class AnimationSet;
00032 }
00033 
00034 namespace LampForMaya{
00035 
00036 class TranslationScene;
00037 
00038 //------------------------------------------------------------------------------
00039 /**
00040  * Lampトランスレータ
00041  */
00042 class LampTranslator{
00043 friend class LampTextTranslator;
00044 friend class LampBinaryTranslator;
00045 public:
00046     /**
00047      * 書き出し
00048      * @param file ファイル名
00049      * @param optionsString オプション
00050      * @param mode ファイルアクセスモード
00051      * @param textFlag テキストフラグ
00052      * @return 成功すれば MStatus::kSuccess
00053      */
00054     virtual MStatus write(const MFileObject& file,
00055         const MString& optionsString, MPxFileTranslator::FileAccessMode mode,
00056         bool textFlag);
00057 
00058     //--------------------------------------------------------------------------
00059     /**
00060      * テキストシーン拡張子の取得
00061      * @return テキストシーン拡張子
00062      */
00063     static String getTextSceneExtension(){ return "tsn"; }
00064 
00065     /**
00066      * テキストアニメーション拡張子の取得
00067      * @return テキストアニメーション拡張子
00068      */
00069     static String getTextAnimationExtension(){ return "tam"; }
00070 
00071     /**
00072      * バイナリシーン拡張子の取得
00073      * @return バイナリシーン拡張子
00074      */
00075     static String getBinarySceneExtension(){ return "bsn"; }
00076 
00077     /**
00078      * バイナリアニメーション拡張子の取得
00079      * @return バイナリアニメーション拡張子
00080      */
00081     static String getBinaryAnimationExtension(){ return "bam"; }
00082 
00083 private:
00084     // コンストラクタ
00085     LampTranslator();
00086 
00087     // デストラクタ
00088     virtual ~LampTranslator();
00089 
00090     // エラー後始末
00091     virtual MStatus errorCleanup();
00092 
00093     // オプション解析
00094     virtual void analyzeOption(const String& options);
00095 
00096     // 開始メッセージ出力
00097     virtual void outputStartMessage();
00098 
00099     // コピーコンストラクタの隠蔽
00100     LampTranslator(const LampTranslator& copy);
00101 
00102     // 代入コピーの隠蔽
00103     void operator =(const LampTranslator& copy);
00104 
00105     // 変換用シーン
00106     TranslationScene* translationScene_;
00107     // シーン
00108     Scene* scene_;
00109     // アニメーションマネージャ
00110     AnimationManager* animationManager_;
00111     // アニメーションセット
00112     AnimationSet* animationSet_;
00113 
00114     // テキスト出力フラグ
00115     bool textExportFlag_;
00116     // シーン出力フラグ
00117     bool exportSceneFlag_;
00118     // ピクチャ出力パス
00119     String picturePath_;
00120     // メッシュ最適化フラグ
00121     bool meshOptimizeFlag_;
00122     // キャラクタスケール
00123     float characterScale_;
00124     // アニメーション出力フラグ
00125     bool exportAnimationFlag_;
00126     // 静的チャンネル削除フラグ
00127     bool deleteStaticChannelsFlag_;
00128 };
00129 
00130 //------------------------------------------------------------------------------
00131 } // End of namespace Lamp
00132 #endif // End of LAMP_TRANSLATOR_H_
00133 //------------------------------------------------------------------------------

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