00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ANIMBUNDLE_H
00016 #define ANIMBUNDLE_H
00017
00018 #include "pandabase.h"
00019
00020 #include "animGroup.h"
00021 #include "pointerTo.h"
00022
00023 class FactoryParams;
00024
00025
00026
00027
00028
00029
00030
00031 class EXPCL_PANDA_CHAN AnimBundle : public AnimGroup {
00032 protected:
00033 AnimBundle(AnimGroup *parent, const AnimBundle ©);
00034
00035 PUBLISHED:
00036 INLINE AnimBundle(const string &name, PN_stdfloat fps, int num_frames);
00037
00038 PT(AnimBundle) copy_bundle() const;
00039
00040 INLINE double get_base_frame_rate() const;
00041 INLINE int get_num_frames() const;
00042
00043 virtual void output(ostream &out) const;
00044
00045 protected:
00046 INLINE AnimBundle();
00047
00048 virtual AnimGroup *make_copy(AnimGroup *parent) const;
00049
00050 private:
00051 PN_stdfloat _fps;
00052 int _num_frames;
00053
00054 public:
00055 static void register_with_read_factory();
00056 virtual void write_datagram(BamWriter* manager, Datagram &me);
00057
00058 static TypedWritable *make_AnimBundle(const FactoryParams ¶ms);
00059
00060 protected:
00061 void fillin(DatagramIterator& scan, BamReader* manager);
00062
00063 public:
00064
00065 virtual TypeHandle get_type() const {
00066 return get_class_type();
00067 }
00068 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00069 static TypeHandle get_class_type() {
00070 return _type_handle;
00071 }
00072 static void init_type() {
00073 AnimGroup::init_type();
00074 register_type(_type_handle, "AnimBundle",
00075 AnimGroup::get_class_type());
00076 }
00077
00078 private:
00079 static TypeHandle _type_handle;
00080 };
00081
00082 inline ostream &operator <<(ostream &out, const AnimBundle &bundle) {
00083 bundle.output(out);
00084 return out;
00085 }
00086
00087
00088 #include "animBundle.I"
00089
00090 #endif