00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MOVINGPARTBASE_H
00020 #define MOVINGPARTBASE_H
00021
00022 #include <pandabase.h>
00023
00024 #include "partGroup.h"
00025 #include "partBundle.h"
00026 #include "animChannelBase.h"
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 class EXPCL_PANDA MovingPartBase : public PartGroup {
00039 protected:
00040 INLINE MovingPartBase(const MovingPartBase ©);
00041
00042 public:
00043 MovingPartBase(PartGroup *parent, const string &name);
00044
00045 virtual TypeHandle get_value_type() const=0;
00046 virtual AnimChannelBase *make_initial_channel() const=0;
00047 virtual void write(ostream &out, int indent_level) const;
00048 virtual void write_with_value(ostream &out, int indent_level) const;
00049 virtual void output_value(ostream &out) const=0;
00050
00051 virtual bool do_update(PartBundle *root, PartGroup *parent,
00052 bool parent_changed, bool anim_changed);
00053
00054 virtual void get_blend_value(const PartBundle *root)=0;
00055 virtual bool update_internals(PartGroup *parent, bool self_changed,
00056 bool parent_changed);
00057
00058 protected:
00059 MovingPartBase(void);
00060
00061 virtual void pick_channel_index(plist<int> &holes, int &next) const;
00062 virtual void bind_hierarchy(AnimGroup *anim, int channel_index);
00063
00064 typedef pvector< PT(AnimChannelBase) > Channels;
00065 Channels _channels;
00066
00067 public:
00068
00069 virtual TypeHandle get_type() const {
00070 return get_class_type();
00071 }
00072 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00073 PUBLISHED:
00074 static TypeHandle get_class_type() {
00075 return _type_handle;
00076 }
00077 public:
00078 static void init_type() {
00079 PartGroup::init_type();
00080 register_type(_type_handle, "MovingPartBase",
00081 PartGroup::get_class_type());
00082 }
00083
00084 private:
00085 static TypeHandle _type_handle;
00086 };
00087
00088 #include "movingPartBase.I"
00089
00090 #endif
00091
00092
00093
00094