00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ANIMCHANNELFIXED_H
00016 #define ANIMCHANNELFIXED_H
00017
00018 #include "pandabase.h"
00019
00020 #include "animChannel.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 template<class SwitchType>
00033 class AnimChannelFixed : public AnimChannel<SwitchType> {
00034 public:
00035 typedef TYPENAME AnimChannel<SwitchType>::ValueType ValueType;
00036
00037 protected:
00038 INLINE AnimChannelFixed(AnimGroup *parent, const AnimChannelFixed<SwitchType> ©);
00039
00040 public:
00041 INLINE AnimChannelFixed(const string &name, const ValueType &value);
00042
00043 virtual bool has_changed(int last_frame, double last_frac,
00044 int this_frame, double this_frac);
00045 virtual void get_value(int frame, ValueType &value);
00046
00047 virtual void output(ostream &out) const;
00048
00049 ValueType _value;
00050
00051 public:
00052 virtual TypeHandle get_type() const {
00053 return get_class_type();
00054 }
00055 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00056 static TypeHandle get_class_type() {
00057 return _type_handle;
00058 }
00059 static void init_type() {
00060 AnimChannel<SwitchType>::init_type();
00061 register_type(_type_handle, SwitchType::get_fixed_channel_type_name(),
00062 AnimChannel<SwitchType>::get_class_type());
00063 }
00064
00065 private:
00066 static TypeHandle _type_handle;
00067 };
00068
00069
00070 #include "animChannelFixed.I"
00071
00072 #endif