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

ExCAnimation.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 /* Benjamin Michotte Linux port, webmaster                              */
00036 /*                                                                      */
00037 /* Mail             :binny@ploksoftware.org                             */
00038 /*                                                                      */
00039 /************************************************************************/
00040 
00041 /************************************************************************/
00042 /* File Description                                                                                             */
00043 /************************************************************************/
00044 /* File Name   :ExCAnimation.h                                                                                  */
00045 /*                                                                                                                                              */
00046 /* Star Date   :03/15/2002                                                                                              */
00047 /*                                                                                                                                              */
00048 /* Last Update :06/20/2003                                              */
00049 /*                                                                                                                                              */
00050 /* File Description :                                                                                                   */
00051 /*                                                                      */
00052 /* For update of this file check : www.ploksoftware.org                 */
00053 /************************************************************************/
00054 
00055 #ifndef __EXCANIMATION_H__
00056 #define __EXCANIMATION_H__
00057 //------------------------------------------------------------------------
00058 //Includes
00059 //------------------------------------------------------------------------
00060 #include "ExDefine.h"
00061 //------------------------------------------------------------------------
00062 #include "Math/ExMath.h"
00063 //------------------------------------------------------------------------
00064 #include "Object/Object3D/ExCObject3D.h"
00065 //------------------------------------------------------------------------
00066 #include "Object/Object3D/Gizmo/ExCGizmoLineBezier.h"
00067 //------------------------------------------------------------------------
00068 #include "Manager/ManagerObject/ExManagerCamera.h"
00069 #include "Manager/ManagerObject/ExManagerModele.h"
00070 #include "Manager/ManagerObject/ExManagerEntity.h"
00071 #include "Manager/ExManagerId.h"
00072 
00073 //------------------------------------------------------------------------
00074 class ExCAnimation : public ExCObject3D
00075 {
00076 protected:
00077 //------------------------------------------------------------------------
00078 // Variable
00079 //------------------------------------------------------------------------
00080         ExManagerCamera                         *ManagerCamera;
00081         ExManagerModel                          *ManagerModel;
00082         ExManagerId                                     *ManagerId;
00083         ExManagerEntity                         *ManagerEntity;
00084 
00085         struct AnimationStruct
00086         {
00087                 ExCGizmoLineBezier                                      m_Line;
00088                 float                                                           m_Speed;
00089                 ExCVec3D                                                        m_AngleCtrlPoint0;
00090                 bool                                                            m_AngleCtrlPoint0Way;
00091                 ExCVec3D                                                        m_AngleCtrlPoint1;
00092                 bool                                                            m_AngleCtrlPoint1Way;
00093                 ExCVec3D                                                        m_AngleCtrlPoint2;
00094                 bool                                                            m_AngleCtrlPoint2Way;
00095                 ExCVec3D                                                        m_AngleCtrlPoint3;
00096                 bool                                                            m_AngleCtrlPoint3Way;
00097                 ExCVec3D                                                        m_AngleCtrlPoint4;
00098                 bool                                                            m_AngleCtrlPoint4Way;
00099                 ExCAction                                                       m_EndAction;
00100                 float                                                           m_NumberIter;
00101         };
00102 
00103         std::string                                                     m_TargetObjectName;
00104         std::string                                                     m_TargetObjectType;
00105         bool                                                            m_ShowPath;
00106         ExCGizmoLineBezier                                      m_Line;
00107         float                                                           m_Time;
00108         std::vector<ExCGizmoLineBezier>         m_VecLine;
00109 
00110         bool                                                            m_Loop;
00111         
00112         
00113         int                                                                     m_CurrentAnimation;
00114         std::vector<AnimationStruct>            m_VecAnimation;
00115         
00116         bool                                                            m_Pause;
00117 public:
00118         ExCObject3D                             *m_Object;
00119 //------------------------------------------------------------------------
00120 // Constructor // Destructor
00121 //------------------------------------------------------------------------
00122         ExCAnimation();
00123         ~ExCAnimation();
00124 //------------------------------------------------------------------------
00125 // Methode
00126 //------------------------------------------------------------------------
00127         inline void SetManagerCamera(ExManagerCamera *Cam){ManagerCamera = Cam;}
00128         inline void SetManagerModel(ExManagerModel *Model){ManagerModel = Model;}
00129         inline void SetManagerId(ExManagerId *Id){ManagerId = Id;}
00130         inline void SetManagerEntity(ExManagerEntity *Entity){ManagerEntity = Entity;}
00131 
00132         void Draw(void);
00133         bool LoadFile(std::string FileName);
00134         void SetShowPathState(bool state);
00135         inline void SetPauseState(bool state){m_Pause=state;}
00136         inline bool GetPauseState(void){return m_Pause;} 
00137 };
00138 //------------------------------------------------------------------------
00139 #endif //__ExCAnimation_H__

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