Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

manip.H

Go to the documentation of this file.
00001 #ifndef MANIP_H_IS_INCLUDED
00002 #define MANIP_H_IS_INCLUDED
00003 
00004 #include "std/support.H"
00005 #include "dev/dev.H"
00006 #include "disp/view.H"
00007 #include "disp/cam.H"
00008 #include "geom/geom.H" // Defines State as State_t <- Consider moving this?
00009 #include "geom/fsa.H" // for Interactor<>, State_t
00010 
00011 class UPobs {
00012    public :
00013     virtual ~UPobs() {}
00014     virtual void reset(int is_reset) = 0;
00015 };
00016 
00017 class Key_int : public Interactor<Key_int,Event,State> {
00018   protected: 
00019    State   _key_down;
00020    
00021   public:
00022    virtual int down(CEvent &,State *&)  { return 0; }
00023    virtual int up  (CEvent &,State *&)  { return 0; }
00024 
00025    Key_int(char k,  State *start)       { add_event(k, start); }
00026    Key_int(char k[],State *start)       { add_event(k, start); }
00027    Key_int()                            { _entry.set_name("Key_int entry"); }
00028 
00029    void add_event(char k[], State *start);
00030    void add_event(char k,   State *start);
00031 };
00032 
00033 class Simple_int : public Interactor<Simple_int,Event,State> {
00034   protected: 
00035    State  _manip_move;
00036    CAMptr _cam;
00037   public:
00038    virtual int  down(CEvent &,State *&)  { cerr << "Manip Down\n"; return 0; }
00039    virtual int  move(CEvent &,State *&)  { cerr << "Manip Move\n"; return 0; }
00040    virtual int  up  (CEvent &,State *&)  { cerr << "Manip Up\n"  ; return 0; }
00041    virtual int  noop(CEvent &,State *&)  { return 0; }
00042 
00043    virtual void add_events(CEvent &d, CEvent &m, CEvent &u);
00044 
00045    virtual     ~Simple_int() { }
00046                 Simple_int(CEvent &d, CEvent &m, CEvent &u);
00047 };
00048 
00049 
00050 class FilmTrans : public Simple_int {
00051   protected:
00052    VIEWptr    _view;            // we
00053    GEOMptr    _obj;             //  don't
00054    mlib::Wpt  _down_pt;         //   need
00055    mlib::Wvec _down_norm;       //    no
00056    bool       _no_xform;        //     stinkin'
00057    bool       _call_xform_obs;  //      comments
00058 
00059   public:
00060    FilmTrans(CEvent &, CEvent &, CEvent &);
00061 
00062    //******** Simple_int METHODS ********
00063    virtual int down(CEvent &e, State *&s);
00064    virtual int move(CEvent &e, State *&s);
00065    virtual int up  (CEvent &e, State *&s);
00066 };
00067 
00068 
00069 extern void scale_along_normal(
00070    CGEOMptr  &obj,
00071    mlib::CWpt      &scale_cent,
00072    mlib::CWpt      &down_pt,
00073    mlib::CWvec     &down_norm,
00074    mlib::CXYpt     &cur
00075    );
00076 
00077 #endif // MANIP_H_IS_INCLUDED

Generated on Mon Sep 18 11:39:32 2006 for jot by  doxygen 1.4.4