00001 /* 00002 * ExNihilo 3D Engine 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 * 00018 * Please read AUTHORS file !!! 00019 * 00020 00021 * 00022 */ 00023 00024 #ifndef __EXCMODEL_H__ 00025 #define __EXCMODEL_H__ 00026 //-------------------------------- 00027 // File to include 00028 //-------------------------------- 00029 #include "ExDefine.h" 00030 #include "ExMath.h" 00031 #include "ExCObject3D.h" 00032 #include "ExManagerTexture.h" 00033 //-------------------------------- 00034 // Type of rendu 00035 //-------------------------------- 00036 #define RENDER_TEXTURES_LIGHT 10001 00037 #define RENDER_TEXTURES 10002 00038 #define RENDER_TRIANGLES_LIGHT 10003 00039 #define RENDER_TRIANGLES 10005 00040 #define RENDER_POINTS 10006 00041 #define RENDER_LINES 10007 00042 #define RENDER_NO 10008 00043 //-------------------------------------- 00044 //ACtion type 00045 //-------------------------------------- 00046 00047 //-------------------------------------- 00048 class ExCModel : public ExCObject3D 00049 { 00050 protected: 00051 //-------------------------------- 00052 // Variable 00053 //-------------------------------- 00054 ExManagerTexture *ManagerTexture; 00055 int m_CurrentFrames; 00056 int m_NextFrame; 00057 int m_numFrames; 00058 float m_InterpolationPourcentage; //% 00059 bool m_Transition; 00060 float m_Interpolation; 00061 int m_KeyFrameStartAction; 00062 int m_KeyFrameStopAction; 00063 std::string m_CurrentAction; 00064 00065 //-------------------------------- 00066 // Methode 00067 //-------------------------------- 00068 public: 00069 //-------------------------------- 00070 // Constructor // Destructor 00071 //-------------------------------- 00072 ExCModel(); 00073 ~ExCModel(); 00074 void Draw(void); 00075 void NextFrame(void); 00076 void PreviousFrame(void); 00077 void SetCurrentFrame(int frame); 00078 inline void SetInterpolationPourcentage(float inter){m_InterpolationPourcentage=inter;} 00079 inline float GetInterpolationPourcentage(void){return m_InterpolationPourcentage;} 00080 //-------------------------------- 00081 // Methode 00082 //-------------------------------- 00083 inline void SetManagerTexture(ExManagerTexture * Texture){ManagerTexture = Texture;} 00084 00085 virtual void StopRun(void); 00086 virtual void StartRun(void); 00087 virtual void StartAction(std::string Action); 00088 virtual void StopAction(void); 00089 void Forward(void); 00090 void Process(std::string Action); 00091 }; 00092 #endif //__EXCMODEL_H__