00001 #ifndef JOT_CAM_EDIT_H
00002 #define JOT_CAM_EDIT_H
00003
00004 #include "disp/cam.H"
00005 #include "manip/manip.H"
00006 #include "manip/cam_pz.H"
00007 #include "base_jotapp/base_jotapp.H"
00008
00009
00010
00011
00012
00013
00014
00015 class Cam_int_edit : public Interactor<Cam_int_edit,Event,State>,
00016 public UPobs {
00017 private:
00018 GEOMptr _model;
00019
00020 protected:
00021
00022
00023 double _dtime;
00024 double _dist;
00025 mlib::PIXEL _start_pix;
00026 mlib::XYpt _scale_pt;
00027 mlib::Wpt _down_pt;
00028 mlib::XYpt _down_pt_2d;
00029 VIEWptr _view;
00030 State _cam_pan, _cam_zoom, _cam_rot, _cam_choose, _cam_drag;
00031 State _move_view, _icon_click;
00032 State _scale, _scale_move, _rotate;
00033 State _scalex, _scaley, _scalez,_scalex_move,_scaley_move,_scalez_move;
00034 State _rot_x, _rot_y, _rot_z;
00035 State _rot_x_move, _rot_y_move, _rot_z_move;
00036 State _ymove;
00037
00038
00039 State _entry2, _but_trans, _but_rot, _but_zoom, _but_drag, _phys;
00040
00041 ARRAY<UPobs*> _up_obs;
00042 int _do_reset;
00043 GEOMptr _geom;
00044 bool _resizing;
00045
00046
00047 public:
00048 void add_up_obs(UPobs *o) { _up_obs += o; }
00049 virtual int predown(CEvent &e,State *&s);
00050 virtual int down (CEvent &e,State *&s);
00051 virtual int down2 (CEvent &e,State *&s);
00052 virtual int choose (CEvent &e,State *&s);
00053 virtual int rot (CEvent &e,State *&s);
00054 virtual int zoom (CEvent &e,State *&s);
00055 virtual int pan (CEvent &e,State *&s);
00056 virtual int rot2 (CEvent &e,State *&s);
00057 virtual int zoom2 (CEvent &e,State *&s);
00058 virtual int pan2 (CEvent &e,State *&s);
00059
00060 virtual int rot_z (CEvent &e,State *&s);
00061 virtual int rot_y (CEvent &e,State *&s);
00062 virtual int rot_x (CEvent &e,State *&s);
00063 virtual int scale (CEvent &e,State *&s);
00064 virtual int scale_x (CEvent &e,State *&s);
00065 virtual int scale_y (CEvent &e,State *&s);
00066 virtual int scale_z (CEvent &e,State *&s);
00067 virtual int edit_down (CEvent &e,State *&s);
00068
00069 virtual int up (CEvent &e,State *&s);
00070 virtual void reset(int rst) {}
00071 virtual int noop (CEvent & ,State *&) { return 0; }
00072
00073 virtual int toggle_buttons (CEvent &e,State *&s);
00074
00075 virtual ~Cam_int_edit() {}
00076 Cam_int_edit(CEvent &d, CEvent &m, CEvent &u, CEvent &d2, CEvent &u2,
00077 CEvent &dt, CEvent &dr, CEvent &dz,
00078 CEvent &ut, CEvent &ur, CEvent &uz);
00079
00080 State *entry2 () { return &_entry2; }
00081 };
00082
00083
00084 #endif // JOT_CAM_EDIT_H
00085