00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CLERPINTERVAL_H
00020 #define CLERPINTERVAL_H
00021
00022 #include "directbase.h"
00023 #include "cInterval.h"
00024
00025
00026
00027
00028
00029
00030
00031 class EXPCL_DIRECT CLerpInterval : public CInterval {
00032 PUBLISHED:
00033 enum BlendType {
00034 BT_no_blend,
00035 BT_ease_in,
00036 BT_ease_out,
00037 BT_ease_in_out,
00038 BT_invalid
00039 };
00040
00041 public:
00042 INLINE CLerpInterval(const string &name, double duration,
00043 BlendType blend_type);
00044
00045 PUBLISHED:
00046 INLINE BlendType get_blend_type() const;
00047
00048 static BlendType string_blend_type(const string &blend_type);
00049
00050 protected:
00051 double compute_delta(double t) const;
00052
00053 private:
00054 BlendType _blend_type;
00055
00056
00057 public:
00058 static TypeHandle get_class_type() {
00059 return _type_handle;
00060 }
00061 static void init_type() {
00062 CInterval::init_type();
00063 register_type(_type_handle, "CLerpInterval",
00064 CInterval::get_class_type());
00065 }
00066 virtual TypeHandle get_type() const {
00067 return get_class_type();
00068 }
00069 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00070
00071 private:
00072 static TypeHandle _type_handle;
00073 };
00074
00075 #include "cLerpInterval.I"
00076
00077 #endif
00078