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

PickModeMove.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: PickModeMove.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.16 $       $Date: 2019/01/17 21:21:01 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *   Pick mode for moving atoms (no forces applied)
00019  ***************************************************************************/
00020 
00021 #ifndef PICKMODEMOVE_H
00022 #define PICKMODEMOVE_H
00023 
00024 #include "PickMode.h"
00025 class DrawMolecule;
00026 class Quat;
00027 
00029 class PickModeMove : public PickMode {
00030 private:
00031   float lastPos[3]; 
00032   int lastCell[3];  
00033   int btn;          
00034   
00036   void get_pointer_pos(DrawMolecule *, DisplayDevice *, int atm, 
00037                        const int *cell,int dim,
00038                        const float *pos, float *newpos); 
00039 
00042   Quat calc_rot_quat(int dim, int btn, DisplayDevice *, const float *mat, 
00043                      const float *pos); 
00044 
00045 protected:
00046   PickModeMove() {} 
00047 
00049   virtual void translate(DrawMolecule *, int tag, const float *) = 0;
00050   virtual void rotate(DrawMolecule *, int tag, const float *, const Quat &) = 0;
00051 
00052 public:
00053   virtual void pick_molecule_start(DrawMolecule *, DisplayDevice *,
00054                              int btn, int tag, const int *cell, 
00055                              int dim, const float *pos);
00056   virtual void pick_molecule_move(DrawMolecule *, DisplayDevice *,
00057                              int tag, int dim, const float *pos);
00058   virtual void pick_molecule_end(DrawMolecule *, DisplayDevice *);
00059 };
00060 
00061 
00063 class PickModeMoveAtom : public PickModeMove {
00064 protected:
00065   virtual void translate(DrawMolecule *, int tag, const float *);
00066   virtual void rotate(DrawMolecule *, int, const float *, const Quat &) {}
00067   
00068 public:
00069   PickModeMoveAtom() {}
00070 };
00071 
00072 
00074 class PickModeMoveResidue : public PickModeMove {
00075 protected:
00076   virtual void translate(DrawMolecule *, int tag, const float *);
00077   virtual void rotate(DrawMolecule *, int tag, const float *, const Quat &);
00078 
00079 public:
00080   PickModeMoveResidue() {}
00081 };
00082 
00083 
00085 class PickModeMoveFragment : public PickModeMove {
00086 protected:
00087   virtual void translate(DrawMolecule *, int tag, const float *);
00088   virtual void rotate(DrawMolecule *, int tag, const float *, const Quat &);
00089 
00090 public:
00091   PickModeMoveFragment() {}
00092 };
00093 
00094 
00096 class PickModeMoveMolecule : public PickModeMove {
00097 protected:
00098   virtual void translate(DrawMolecule *, int tag, const float *);
00099   virtual void rotate(DrawMolecule *, int tag, const float *, const Quat &);
00100 
00101 public:
00102   PickModeMoveMolecule() {}
00103 };
00104 
00105 
00107 class PickModeMoveRep : public PickModeMove {
00108 protected:
00109   virtual void translate(DrawMolecule *, int tag, const float *);
00110   virtual void rotate(DrawMolecule *, int tag, const float *, const Quat &);
00111   
00112 public:
00113   PickModeMoveRep() {}
00114 };
00115 
00116 #endif
00117 

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