00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef STAGE_H
00023 #define STAGE_H
00024
00025 #include "Displayable.h"
00026 #include "DispCmds.h"
00027
00029 class Stage : public Displayable {
00030 public:
00032 enum StagePos { NO_STAGE = 0, STAGE_ORIGIN, STAGE_LOWER, STAGE_UPPER,
00033 STAGE_LEFT, STAGE_RIGHT, STAGE_BEHIND, STAGEPOS_TOTAL };
00034
00035 private:
00036
00037 float corner1[3], corner2[3], corner3[3], corner4[3];
00038 int usecolors[2];
00039 int Panels;
00040 float Size;
00041 float inc;
00042 int stagePos;
00043 int need_update;
00044 DispCmdColorIndex cmdColor;
00045 DispCmdSquare cmdSquare;
00046 DispCmdPickPoint pickPoint;
00047 int colorCat;
00048 int movedStage;
00049
00051 void create_cmdlist(void);
00052
00053 protected:
00054 virtual void do_color_changed(int);
00055
00056 public:
00058 Stage(Displayable *);
00059
00061 int location(int);
00062
00064 int location(void) { return stagePos; }
00065
00067 char *loc_description(int);
00068
00070 int locations(void) { return STAGEPOS_TOTAL; }
00071
00073 int panels(void) { return Panels; }
00074
00076 int panels(int newp) {
00077 if (newp == Panels) return TRUE;
00078 if (newp >= 1 && newp <= 30) {
00079 Panels = newp;
00080 inc = (Size * 2.0f) / (float) Panels;
00081 need_update = TRUE;
00082 return TRUE;
00083 }
00084 return FALSE;
00085 }
00086
00087
00089 float size(void) { return Size; }
00090
00092 float size(float newsize) {
00093 Size = newsize;
00094 inc = (Size * 2.0f) / (float) Panels;
00095 need_update = TRUE;
00096 return TRUE;
00097 }
00098
00099
00100
00101
00102
00104 virtual void prepare();
00105
00112 virtual void pick_move(PickMode *, DisplayDevice *, int, int, const float *);
00113
00114 };
00115
00116 #endif
00117