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

Axes.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2011 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: Axes.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.39 $       $Date: 2011/02/17 21:58:13 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *
00019  * A Displayable object which consists of a set of axes, which may be
00020  * drawn anywhere on the screen, at any size.
00021  *
00022  ***************************************************************************/
00023 #ifndef AXES_H
00024 #define AXES_H
00025 
00026 #include "Displayable.h"
00027 #include "DispCmds.h"
00028 
00029 
00031 class Axes : public Displayable {
00032 public:
00034   enum AxesPos { NO_AXES = 0, AXES_ORIGIN, AXES_LOWERLEFT, 
00035         AXES_LOWERRIGHT, AXES_UPPERLEFT, AXES_UPPERRIGHT, AXESPOS_TOTAL };
00036 
00037 private:
00038   DisplayDevice *disp;
00039 
00041   float origin[3], xLine[3], yLine[3], zLine[3];
00042   float xLineCap[3], yLineCap[3], zLineCap[3];
00043   float xText[3], yText[3], zText[3];
00044 
00045   int usecolors[5];        
00046   int axesPos;             
00047   float Aspect;            
00048   int colorCat;            
00049   int movedAxes;           
00050   int need_create_cmdlist; 
00051 
00052   // display command objects used to render the axes
00053   DispCmdBeginRepGeomGroup cmdBeginRepGeomGroup;
00054   DispCmdSphereRes sphres;
00055   DispCmdSphereType sphtype;
00056   DispCmdColorIndex xcol;
00057   DispCmdCylinder xcyl;
00058   DispCmdCone xcap;
00059   DispCmdSphere sph;
00060   DispCmdText txt;
00061   DispCmdPickPoint pickPoint;
00062   DispCmdComment cmdCommentX;
00063 
00065   void create_cmdlist(void);
00066 
00067 protected:
00068   virtual void do_color_changed(int);
00069 
00070 public:
00072   Axes(DisplayDevice *, Displayable *);
00073   virtual ~Axes(void);
00074 
00075   int location(int);                           
00076   int location(void) { return axesPos; }       
00077   char *loc_description(int);                  
00078   int locations(void){ return AXESPOS_TOTAL; } 
00079 
00080   //
00081   // public virtual routines
00082   //
00083   
00085   virtual void prepare();
00086 
00093   virtual void pick_move(PickMode *, DisplayDevice *, int, int, const float *);
00094 };
00095 
00096 #endif
00097 

Generated on Sat May 26 01:47:43 2012 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002