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

P_PinchTool.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 #ifndef P_PINCHTOOL_H
00009 #define P_PINCHTOOL_H
00010 
00011 #include "P_Tool.h"
00012 
00016 class PinchTool : public Tool {
00017  public:
00018   PinchTool(int id, VMDApp *, Displayable *);
00019   virtual void do_event();
00020   virtual int isgrabbing() { return 0; } // tug instead of grabbing!
00021 
00022   virtual void setspringscale(float sc) {
00023     springscale=sc;
00024     Tool::setspringscale(sc);
00025   }
00026  
00027   const char *type_name() const { return "pinch"; }
00028 
00029 protected:
00030   virtual void start_tug() {}
00031 
00032  private:
00033   virtual int istugging() { return Tool::isgrabbing(); }
00034 
00035   int tugging;
00036   float tugged_pos[3];
00037   float offset[3];    // An offset so that initial force is always zero
00038   float springscale;
00039 };
00040 
00041 #endif

Generated on Fri Nov 8 02:45:19 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002