Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Membres des namespaces | Composants | Déclarations

ExCModel.h

Aller à la documentation de ce fichier.
00001 /************************************************************************/
00002 /* Ex Nihlo Engine by Hermanns Christophe                                                               */
00003 /************************************************************************/
00004 /* This program is free software; you can redistribute it and/or                */
00005 /* modify it under the terms of the GNU General Public License                  */
00006 /* as published by the Free Software Foundation; either version 2               */
00007 /* of the License, or (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.                                 */
00012 /*                                                                                                                                              */
00013 /* See the GNU General Public License for more details.                                 */
00014 /*                                                                                                                                              */
00015 /* You should have received a copy of the GNU General Public License    */
00016 /* along with this program; if not, write to the Free Software                  */
00017 /* Foundation, Inc., 59 Temple Place - Suite 330,                                               */
00018 /* Boston, MA  02111-1307, USA.                                                                                 */
00019 /*                                                                                                                                              */
00020 /* If you use a important part of this code please send me a mail               */
00021 /* I just want to see where my code go thks :)                                                  */
00022 /************************************************************************/
00023 
00024 /************************************************************************/
00025 /* Contact                                                              */  
00026 /************************************************************************/
00027 /* ExNihilo Website :www.ploksoftware.org                               */
00028 /*                                                                      */
00029 /* Hermanns Christophe ExNihilo creator and main programmer             */
00030 /*                                                                      */
00031 /* Mail             : Data@ploksoftware.org                                                             */
00032 /* ICQ              : 8030901                                                                                   */
00033 /* MSN Messenger    : Data_7@hotmail.com                                                                */
00034 /*                                                                      */
00035 /*                                                                      */
00036 /************************************************************************/
00037 
00038 
00039 /************************************************************************/
00040 /* File Description                                                                                             */
00041 /************************************************************************/
00042 /* File Name   :ExCModel.h                                                                                              */
00043 /*                                                                                                                                              */
00044 /* Star Date   :03/15/2002                                                                                              */
00045 /*                                                                                                                                              */
00046 /* Last Update :06/20/2003                                              */
00047 /*                                                                                                                                              */
00048 /* File Description :                                                                                                   */
00049 /*                                                                      */
00050 /* For update of this file check : www.ploksoftware.org                 */
00051 /************************************************************************/     
00052 
00053 #ifndef __EXCMODEL_H__
00054 #define __EXCMODEL_H__
00055 //------------------------------------------------------------------------
00056 //Includes
00057 //------------------------------------------------------------------------
00058 #include "ExDefine.h"
00059 //------------------------------------------------------------------------
00060 #include "Math/ExMath.h"
00061 //------------------------------------------------------------------------
00062 #include "Object/Object3D/ExCObject3D.h"
00063 //------------------------------------------------------------------------
00064 #include "Manager/ManagerObject/ExManagerTexture.h"
00065 //------------------------------------------------------------------------
00066 #include "Object/Object3D/Gizmo/ExCGizmo.h"
00067 //------------------------------------------------------------------------
00068 // Define
00069 //------------------------------------------------------------------------
00070 #define RENDER_TEXTURES_LIGHT           10001
00071 #define RENDER_TEXTURES                         10002
00072 #define RENDER_TRIANGLES_LIGHT      10003
00073 #define RENDER_TRIANGLES                        10005
00074 #define RENDER_POINTS                           10006
00075 #define RENDER_LINES                            10007
00076 #define RENDER_NO                                       10008
00077 
00078 enum 
00079 { 
00080         RENDER_VERTEX_ARRAY = 0,
00081         RENDER_IMMEDIATE_MODE = 1,
00082         RENDER_DISPLAY_LIST = 2
00083 };
00084 
00085 //------------------------------------------------------------------------
00086 class ExCModel : public ExCObject3D
00087 {
00088 protected:
00089 //------------------------------------------------------------------------
00090 // Variable
00091 //------------------------------------------------------------------------
00092         ExManagerTexture                        *ManagerTexture;
00093         int                                                     m_CurrentFrames;
00094         int                                                     m_NextFrame;
00095         int                                                     m_numFrames;
00096         float                                           m_InterpolationPourcentage;  //%
00097         bool                                            m_Transition;
00098         float                                           m_Interpolation;
00099         int                                                     m_KeyFrameStartAction;
00100         int                                                     m_KeyFrameStopAction;
00101         std::string                                     m_CurrentAction;
00102         ExCGizmo                                        *m_CollisionGizmo;
00103         int                                                     m_CollisionCounter;
00104 
00105         int                                                     m_RenderMode;
00106 public:
00107 //--------------------------------
00108 // Constructor // Destructor
00109 //--------------------------------
00110         ExCModel();
00111         ~ExCModel();
00112 //------------------------------------------------------------------------
00113 // Methode
00114 //------------------------------------------------------------------------
00115         bool m_AlwaysDraw;
00116         void Draw(void);
00117         virtual bool Load(std::string FileName){return false;}
00118         void NextFrame(void);
00119         void PreviousFrame(void);
00120         void SetCurrentFrame(int frame);
00121         inline int GetCurrentFrame(void){return m_CurrentFrames; }
00122         inline void SetInterpolationPourcentage(float inter){m_InterpolationPourcentage=inter;}
00123         inline float GetInterpolationPourcentage(void){return m_InterpolationPourcentage;}
00124         inline void SetManagerTexture(ExManagerTexture * Texture){ManagerTexture = Texture;}
00125         
00126         virtual void StopRun(void);
00127         virtual void StartRun(void);
00128         virtual void StartAction(std::string     Action);
00129         virtual void StopAction(void);
00130         void Forward(void);
00131         void Process(std::string         Action);
00132         virtual ExCAction InputAction(ExCAction Action);
00133         inline ExCGizmo * GetCollisionGizmo(void){return m_CollisionGizmo;}
00134         inline void IncreaseCollisionCouter(void){m_CollisionCounter++;}
00135         inline void DeCreaseCollisionCouter(void){m_CollisionCounter--;}
00136         inline void ResetCollisionCouter(void){m_CollisionCounter=0;}
00137         virtual void CallAllList(void){};
00138 
00139         inline void SetRenderMode(int mode){m_RenderMode = mode;}
00140 };
00141 //------------------------------------------------------------------------
00142 #endif //__EXCMODEL_H__

Généré le Tue Oct 28 12:43:31 2003 pour ExNihilo par doxygen 1.3.4