00001
00002
00003
00004
00005
00006
00007
00008 #ifndef LerpEffect_Header
00009 #define LerpEffect_Header
00010
00011 #include <DrawObj.H>
00012 #include <IS3D.H>
00013 #include "Word.H"
00014 #include "Effect.H"
00015
00016 using namespace std;
00017
00023 namespace cavewriting {
00024
00025
00026 class LerpEffect : public Effect {
00027
00028 public:
00029
00030 LerpEffect(Array<Word*>& words,
00031 double startTime, double duration, bool startPaused,
00032 const CoordinateFrame& startFrame, const CoordinateFrame& endFrame,
00033 Effect * nextEffect = NULL);
00034
00035 LerpEffect(Word* word,
00036 double startTime, double duration, bool startPaused,
00037 const CoordinateFrame& startFrame, const CoordinateFrame& endFrame,
00038 Effect *nextEffect = NULL);
00039
00040 static LerpEffect* fromXML(xercesc::DOMElement * node, bool startPaused = true);
00041 virtual ~LerpEffect();
00042
00043 virtual void animate();
00044
00045 void enableBounce() { _enableBounce = true; }
00046
00047 protected:
00048
00049 CoordinateFrame _startFrame;
00050 CoordinateFrame _endFrame;
00051 Effect * _nextEffect;
00052 bool _enableBounce;
00053
00054 private:
00055
00056 };
00057 }
00058
00059 #endif