dustyinterpolatedtask.h

Go to the documentation of this file.
00001 #ifndef __DUSTY_INTERPOLATED_TASK_H__
00002 #define __DUSTY_INTERPOLATED_TASK_H__
00003 
00004 namespace DustyEngine
00005 {
00006         class DummyTask;
00007         
00009 
00018         class DUSTYENGINE_API InterpolatedTask : public DummyTask
00019         {
00020         public:
00022                 InterpolatedTask();
00023 
00024                 virtual ~InterpolatedTask();
00025 
00028 
00031                 irr::f32 GetInterpolationValue();
00032 
00034                 // \param loop: If loop is true, the interpolation will loop back at the beginning once it reaches the end.  If it is false, the interpolation will stop once it reaches the end.
00035                 void SetLooping(bool loop);
00036 
00039                 bool GetLooping()
00040                 {
00041                         return looping;
00042                 }
00043 
00046                 void SetReverseLooping(bool reverse);
00047 
00050                 bool GetReverseLooping()
00051                 {
00052                         return reverseLooping;
00053                 }
00054 
00056                 void Reverse()
00057                 {
00058                         inReverse = !inReverse;
00059                 }
00060 
00063                 bool IsInReverse()
00064                 {
00065                         return inReverse;
00066                 }
00067 
00070                 void SetInterpolationValue(irr::f32 value);
00071 
00074                 void SetInterpolationTime(irr::u32 time)
00075                 {
00076                         interpolationTime = time;
00077                 }
00078 
00081                 irr::u32 GetInterpolationTime()
00082                 {
00083                         return interpolationTime;
00084                 }
00085 
00086                 void OnUpdate();
00087 
00088         protected:
00089                 void UpdateTimeDelta();
00090                 void UpdateLooping();
00091 
00092                 irr::u32 timePassed;
00093                 irr::u32 interpolationTime;
00094                 bool looping;
00095                 bool reverseLooping;
00096                 bool inReverse;
00097         };
00098 }
00099 
00100 #endif
00101 

Generated on Fri Jan 27 17:31:50 2006 for Dusty Engine by  doxygen 1.4.6-NO