00001 /* *********************************************************************************** 00002 Writer: Sebastien Bloc 00003 Copyright: 2003-2004 00004 eMail: sebastien.bloc@free.fr 00005 URL: http://mignonsoft.free.fr 00006 00007 This program is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License 00009 as published by the Free Software Foundation; either version 2 00010 of the License, or (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 http://www.gnu.org/copyleft/gpl.html 00017 *********************************************************************************** */ 00018 00023 #ifndef INCLUDE_EFFECT_H 00024 #define INCLUDE_EFFECT_H 00025 00026 #include "3d.h" 00027 #include "face.h" 00028 #include "sigslot.h" 00029 #include "input.h" 00030 00041 class Effect : public has_slots<> 00042 { 00043 protected: 00044 FaceNode *faceNode; 00045 BOOL isFadeIn; 00046 BOOL isRunning; 00047 MyTree<Face> oldTree; 00048 LARGE_INTEGER beginTime; 00049 00050 00051 public: 00052 signal0<> onEnding; 00053 00054 Effect(); 00055 void Bind(FaceNode *_faceNode); 00056 }; 00057 00058 class EffectApparition : public Effect 00059 { 00060 private: 00061 double nbSeconds; 00062 double progress; 00063 int OnTimer(Timer *timer); 00064 void Apply(FaceNode *faceNode,FaceNode *oldFace,int level); 00065 void Apply(Face *face,Face *oldFace,int level); 00066 void UnApply(FaceNode *faceNode,FaceNode *oldFace,int level); 00067 void UnApply(Face *face,Face *oldFace,int level); 00068 public: 00069 00070 EffectApparition(); 00071 ~EffectApparition(); 00072 void Start(BOOL _isFadeIn,double _nbSeconds); 00073 void Stop(); 00074 }; 00075 00076 /* effet a faire 00077 EffectShow 00078 EffectStreetch 00079 EffectHomewold 00080 EffectCompress 00081 EffectRotate 00082 EffectExplosed 00083 */ 00084 00085 #endif