00001 #ifndef __BL_BLENDERIPO_H 00002 #define __BL_BLENDERIPO_H 00003 00004 #include <vector> 00005 00006 #include "KX_IScalarInterpolator.h" 00007 00008 typedef unsigned short BL_IpoChannel; 00009 00010 class BL_ScalarInterpolator : public KX_IScalarInterpolator { 00011 public: 00012 BL_ScalarInterpolator() {} // required for use in STL list 00013 BL_ScalarInterpolator(struct Ipo *ipo, BL_IpoChannel channel) : 00014 m_blender_ipo(ipo), 00015 m_channel(channel) 00016 {} 00017 00018 virtual ~BL_ScalarInterpolator() {} 00019 00020 virtual float GetValue(float currentTime) const; 00021 00022 BL_IpoChannel GetChannel() const { return m_channel; } 00023 00024 private: 00025 struct Ipo *m_blender_ipo; 00026 BL_IpoChannel m_channel; 00027 }; 00028 00029 00030 class BL_InterpolatorList : public std::vector<KX_IScalarInterpolator *> { 00031 public: 00032 BL_InterpolatorList(struct Ipo *ipo); 00033 ~BL_InterpolatorList(); 00034 00035 KX_IScalarInterpolator *GetScalarInterpolator(BL_IpoChannel channel); 00036 }; 00037 00038 00039 00040 00041 // Still need these?? 00042 00043 bool BL_HasIPO(struct Object* blenderobj); 00044 void BL_calc_ipo(struct Object* blenderobject, float curframetime); 00045 void BL_execute_ipo(struct Object* blenderobject); 00046 void BL_DoDLocIPO(struct Object* blenderobject); 00047 00048 #endif //__BL_BLENDERIPO_H