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 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
00082
00083
00085 virtual void prepare();
00086
00093 virtual void pick_move(PickMode *, DisplayDevice *, int, int, const float *);
00094 };
00095
00096 #endif
00097