00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef MOVINGPARTSCALAR_H
00016 #define MOVINGPARTSCALAR_H
00017
00018 #include "pandabase.h"
00019
00020 #include "movingPart.h"
00021 #include "animChannel.h"
00022 #include "animChannelFixed.h"
00023
00024 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_CHAN, EXPTP_PANDA_CHAN, MovingPart<ACScalarSwitchType>);
00025
00026
00027
00028
00029
00030
00031 class EXPCL_PANDA_CHAN MovingPartScalar : public MovingPart<ACScalarSwitchType> {
00032 protected:
00033 INLINE MovingPartScalar(const MovingPartScalar ©);
00034
00035 public:
00036 INLINE MovingPartScalar(PartGroup *parent, const string &name,
00037 const PN_stdfloat &default_value = 0);
00038 virtual ~MovingPartScalar();
00039
00040 virtual void get_blend_value(const PartBundle *root);
00041
00042 virtual bool apply_freeze_scalar(PN_stdfloat value);
00043 virtual bool apply_control(PandaNode *node);
00044
00045 protected:
00046 INLINE MovingPartScalar();
00047
00048 public:
00049 static void register_with_read_factory();
00050
00051 static TypedWritable *make_MovingPartScalar(const FactoryParams ¶ms);
00052
00053 public:
00054 virtual TypeHandle get_type() const {
00055 return get_class_type();
00056 }
00057 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00058 PUBLISHED:
00059 static TypeHandle get_class_type() {
00060 return _type_handle;
00061 }
00062 public:
00063 static void init_type() {
00064 MovingPart<ACScalarSwitchType>::init_type();
00065 AnimChannelFixed<ACScalarSwitchType>::init_type();
00066 register_type(_type_handle, "MovingPartScalar",
00067 MovingPart<ACScalarSwitchType>::get_class_type());
00068 }
00069
00070 private:
00071 static TypeHandle _type_handle;
00072 };
00073
00074 #include "movingPartScalar.I"
00075
00076
00077 #ifdef __GNUC__
00078 #pragma interface
00079 #endif
00080
00081 #endif
00082
00083
00084