00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef FLTTRANSFORMPUT_H
00016 #define FLTTRANSFORMPUT_H
00017
00018 #include "pandatoolbase.h"
00019
00020 #include "fltTransformRecord.h"
00021
00022
00023
00024
00025
00026
00027
00028 class FltTransformPut : public FltTransformRecord {
00029 public:
00030 FltTransformPut(FltHeader *header);
00031
00032 void set(const LPoint3d &from_origin,
00033 const LPoint3d &from_align,
00034 const LPoint3d &from_track,
00035 const LPoint3d &to_origin,
00036 const LPoint3d &to_align,
00037 const LPoint3d &to_track);
00038
00039 const LPoint3d &get_from_origin() const;
00040 const LPoint3d &get_from_align() const;
00041 const LPoint3d &get_from_track() const;
00042 const LPoint3d &get_to_origin() const;
00043 const LPoint3d &get_to_align() const;
00044 const LPoint3d &get_to_track() const;
00045
00046 private:
00047 void recompute_matrix();
00048
00049 LPoint3d _from_origin;
00050 LPoint3d _from_align;
00051 LPoint3d _from_track;
00052 LPoint3d _to_origin;
00053 LPoint3d _to_align;
00054 LPoint3d _to_track;
00055
00056 protected:
00057 virtual bool extract_record(FltRecordReader &reader);
00058 virtual bool build_record(FltRecordWriter &writer) const;
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 FltTransformRecord::init_type();
00070 register_type(_type_handle, "FltTransformPut",
00071 FltTransformRecord::get_class_type());
00072 }
00073
00074 private:
00075 static TypeHandle _type_handle;
00076 };
00077
00078 #endif
00079
00080