00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
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   
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   DispCmdComment cmdCommentX;
00062 
00064   void create_cmdlist(void);
00065 
00066 protected:
00067   virtual void do_color_changed(int);
00068 
00069 public:
00071   Axes(DisplayDevice *, Displayable *);
00072   virtual ~Axes(void);
00073 
00074   int location(int);                           
00075   int location(void) { return axesPos; }       
00076   char *loc_description(int);                  
00077   int locations(void){ return AXESPOS_TOTAL; } 
00078 
00079   
00080   
00081   
00082   
00084   virtual void prepare();
00085 
00092   virtual void pick_move(PickMode *, DisplayDevice *, int, int, const float *);
00093 };
00094 
00095 #endif
00096