Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

P_TugTool.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2019 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: P_TugTool.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.42 $       $Date: 2019/01/17 21:21:01 $
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; } // tug instead of grabbing!
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   // applies a force (returns the actual force applied in the argument)
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];    // An offset so that initial force is always zero
00053   float springscale;
00054 };
00055 
00056 #endif

Generated on Fri Oct 4 02:44:47 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002