Main Page   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-2008 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.34 $       $Date: 2008/03/27 19:36:35 $
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 
00047   int axesPos;  
00048   float Aspect; 
00049   int colorCat; 
00050 
00051   // display command objects used to render the axes
00052   DispCmdSphereRes sphres;
00053   DispCmdSphereType sphtype;
00054   DispCmdColorIndex xcol;
00055   DispCmdCylinder xcyl;
00056   DispCmdCone xcap;
00057   DispCmdSphere sph;
00058   DispCmdText txt;
00059   DispCmdPickPoint pickPoint;
00060   DispCmdComment cmdCommentX;
00061 
00063   int need_create_cmdlist;
00064   void create_cmdlist(void);
00065 
00067   int movedAxes;
00068 
00069 protected:
00070   virtual void do_color_changed(int);
00071 
00072 public:
00074   Axes(DisplayDevice *, Displayable *);
00075   virtual ~Axes(void);
00076 
00077   int location(int);                     
00078   int location(void) { return axesPos; } 
00079   char *loc_description(int);            
00080   int locations(void){ return AXESPOS_TOTAL; } 
00081 
00082   //
00083   // public virtual routines
00084   //
00085   
00087   virtual void prepare();
00088 
00095   virtual void pick_move(PickMode *, DisplayDevice *, int, int, const float *);
00096 
00097 };
00098 
00099 #endif
00100 

Generated on Sun Jul 6 01:27:19 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002