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