00001 #ifndef KX_SCALARINTERPOLATOR 00002 #define KX_SCALARINTERPOLATOR 00003 00004 #include "MT_Scalar.h" 00005 #include "KX_IInterpolator.h" 00006 00007 class KX_IScalarInterpolator; 00008 00009 class KX_ScalarInterpolator : public KX_IInterpolator { 00010 public: 00011 KX_ScalarInterpolator(MT_Scalar* target, 00012 KX_IScalarInterpolator *ipo) : 00013 m_target(target), 00014 m_ipo(ipo) 00015 {} 00016 00017 virtual ~KX_ScalarInterpolator() {} 00018 virtual void Execute(float currentTime) const; 00019 void SetNewTarget(MT_Scalar* newtarget) 00020 { 00021 m_target=newtarget; 00022 } 00023 MT_Scalar* GetTarget() 00024 { 00025 return m_target; 00026 } 00027 private: 00028 MT_Scalar* m_target; 00029 KX_IScalarInterpolator *m_ipo; 00030 }; 00031 00032 #endif