00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ANIMCHANNELMATRIXFIXED_H
00016 #define ANIMCHANNELMATRIXFIXED_H
00017
00018 #include "pandabase.h"
00019
00020 #include "animChannel.h"
00021 #include "luse.h"
00022
00023 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_CHAN, EXPTP_PANDA_CHAN, AnimChannel<ACMatrixSwitchType>);
00024
00025
00026
00027
00028
00029
00030 class EXPCL_PANDA_CHAN AnimChannelMatrixFixed : public AnimChannel<ACMatrixSwitchType> {
00031 protected:
00032 AnimChannelMatrixFixed(AnimGroup *parent, const AnimChannelMatrixFixed ©);
00033
00034 public:
00035 AnimChannelMatrixFixed(const string &name, const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale);
00036
00037 virtual bool has_changed(int last_frame, double last_frac,
00038 int this_frame, double this_frac);
00039 virtual void get_value(int frame, LMatrix4 &value);
00040 virtual void get_value_no_scale_shear(int frame, LMatrix4 &value);
00041 virtual void get_scale(int frame, LVecBase3 &scale);
00042 virtual void get_hpr(int frame, LVecBase3 &hpr);
00043 virtual void get_quat(int frame, LQuaternion &quat);
00044 virtual void get_pos(int frame, LVecBase3 &pos);
00045 virtual void get_shear(int frame, LVecBase3 &shear);
00046
00047 virtual void output(ostream &out) const;
00048
00049 private:
00050 LVecBase3 _pos, _hpr, _scale;
00051
00052 public:
00053 static void register_with_read_factory();
00054 virtual void write_datagram(BamWriter *manager, Datagram &dg);
00055
00056 protected:
00057 static TypedWritable *make_from_bam(const FactoryParams ¶ms);
00058 void fillin(DatagramIterator &scan, BamReader *manager);
00059
00060 public:
00061 virtual TypeHandle get_type() const {
00062 return get_class_type();
00063 }
00064 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00065 static TypeHandle get_class_type() {
00066 return _type_handle;
00067 }
00068 static void init_type() {
00069 AnimChannel<ACMatrixSwitchType>::init_type();
00070 register_type(_type_handle, "AnimChannelMatrixFixed",
00071 AnimChannel<ACMatrixSwitchType>::get_class_type());
00072 }
00073
00074 private:
00075 static TypeHandle _type_handle;
00076 };
00077
00078 #include "animChannelMatrixFixed.I"
00079
00080 #endif
00081
00082
00083