00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CLERPANIMEFFECTINTERVAL_H
00016 #define CLERPANIMEFFECTINTERVAL_H
00017
00018 #include "directbase.h"
00019 #include "cLerpInterval.h"
00020 #include "animControl.h"
00021 #include "pointerTo.h"
00022 #include "pvector.h"
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class EXPCL_DIRECT CLerpAnimEffectInterval : public CLerpInterval {
00036 PUBLISHED:
00037 INLINE CLerpAnimEffectInterval(const string &name, double duration,
00038 BlendType blend_type);
00039
00040 INLINE void add_control(AnimControl *control, const string &name,
00041 float begin_effect, float end_effect);
00042
00043 virtual void priv_step(double t);
00044
00045 virtual void output(ostream &out) const;
00046
00047 private:
00048 class ControlDef {
00049 public:
00050 INLINE ControlDef(AnimControl *control, const string &name,
00051 float begin_effect, float end_effect);
00052 PT(AnimControl) _control;
00053 string _name;
00054 float _begin_effect;
00055 float _end_effect;
00056 };
00057
00058 typedef pvector<ControlDef> Controls;
00059 Controls _controls;
00060
00061
00062 public:
00063 static TypeHandle get_class_type() {
00064 return _type_handle;
00065 }
00066 static void init_type() {
00067 CLerpInterval::init_type();
00068 register_type(_type_handle, "CLerpAnimEffectInterval",
00069 CLerpInterval::get_class_type());
00070 }
00071 virtual TypeHandle get_type() const {
00072 return get_class_type();
00073 }
00074 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00075
00076 private:
00077 static TypeHandle _type_handle;
00078 };
00079
00080 #include "cLerpAnimEffectInterval.I"
00081
00082 #endif
00083