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

# TranslationSequence.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_SEQUENCE_H_
    00026 #define TRANSLATION_SEQUENCE_H_
    00027
    00028 namespace LampForMaya{
    00029
    00030 //------------------------------------------------------------------------------
    00031 /**
    00032  * 変換シーケンス
    00033  */
    00034 class TranslationSequence{
    00035 public:
    00036     /**
    00037      * コンストラクタ
    00038      */
    00039     TranslationSequence();
    00040
    00041     /**
    00042      * デストラクタ
    00043      */
    00044     virtual ~TranslationSequence();
    00045
    00046     /**
    00047      * 分析
    00048      * @param object 分析するオブジェクト
    00049      * @return シーケンスがあればtrue
    00050      */
    00051     virtual bool analyze(const MObject& object);
    00052
    00053     /**
    00054      * シーケンスを持つか
    00055      * @return シーケンスを持つならtrue
    00056      */
    00057     virtual bool hasSequence() const{ return hasSequence_; }
    00058
    00059     /**
    00060      * シーケンス数の取得
    00061      * @return シーケンス数
    00062      */
    00063     virtual int getSequenceCount() const{ return sequenceCount_; }
    00064
    00065     /**
    00066      * 開始時間の取得
    00067      * @param sequence シーケンス
    00068      * @return 開始時間
    00069      */
    00070     virtual int getStartTime(int sequence){
    00071         Assert(startTime_ != NULL);
    00072         Assert(sequence >= 0);
    00073         Assert(sequence < sequenceCount_);
    00074         return startTime_[sequence];
    00075     }
    00076
    00077     /**
    00078      * 終了時間の取得
    00079      * @param sequence シーケンス
    00080      * @return 終了時間
    00081      */
    00082     virtual int getEndTime(int sequence){
    00083         Assert(endTime_ != NULL);
    00084         Assert(sequence >= 0);
    00085         Assert(sequence < sequenceCount_);
    00086         return endTime_[sequence];
    00087     }
    00088
    00089     /**
    00090      * ループの取得
    00091      * @param sequence シーケンス
    00092      * @return ループ
    00093      */
    00094     virtual bool isLooped(int sequence){
    00095         Assert(looped_ != NULL);
    00096         Assert(sequence >= 0);
    00097         Assert(sequence < sequenceCount_);
    00098         return looped_[sequence];
    00099     }
    00100
    00101 private:
    00102     // コピーコンストラクタの隠蔽
    00103     TranslationSequence(const TranslationSequence& copy);
    00104
    00105     // 代入コピーの隠蔽
    00106     void operator =(const TranslationSequence& copy);
    00107
    00108     // シーケンス数
    00109     int sequenceCount_;
    00110     // 開始時間
    00111     int* startTime_;
    00112     // 終了時間
    00113     int* endTime_;
    00114     // ループ
    00115     bool* looped_;
    00116     // シーケンスを持つか
    00117     bool hasSequence_;
    00118 };
    00119
    00120 //------------------------------------------------------------------------------
    00121 } // End of namespace Lamp
    00122 #endif // End of TRANSLATION_SEQUENCE_H_
    00123 //------------------------------------------------------------------------------
    00124