00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00019 
00023 #ifndef P_TUGTOOL_H
00024 #define P_TUGTOOL_H
00025 
00026 #include "P_Tool.h"
00027 class TugTool : public Tool {
00028  public:
00029   TugTool(int id, VMDApp *, Displayable *);
00030   virtual void do_event();
00031   virtual int isgrabbing() { return 0; } 
00032 
00033   virtual void setspringscale(float sc) {
00034     springscale=sc;
00035     Tool::setspringscale(sc);
00036   }
00037  
00038   const char *type_name() const { return "tug"; }
00039 protected:
00040   virtual void start_tug() {}
00041 
00042 private:
00043   virtual int istugging() { return Tool::isgrabbing(); }
00044 
00045   
00046   virtual void do_tug(float *force);
00047 
00048   virtual void set_tug_constraint(float *pos);
00049 
00050   int tugging;
00051   float tugged_pos[3];
00052   float offset[3];    
00053   float springscale;
00054 };
00055 
00056 #endif