Debian Codegraph @

07p/plaut04/src/axis.h

raw symbols SCIP
1 #ifndef MY_AXIS_H
2 #define MY_AXIS_H
3 #endif
4 //#define TD_FONT
5
6 #include <Inventor/nodes/SoSeparator.h>
7 #include <Inventor/nodes/SoCylinder.h>
8 #include <Inventor/nodes/SoCone.h>
9 #include <Inventor/nodes/SoFont.h>
10 #include <Inventor/nodes/SoText2.h>
11 #include <Inventor/nodes/SoText3.h>
12 #include <Inventor/nodes/SoTransform.h>
13 #include <Inventor/nodes/SoMaterial.h>
14
15
16 class Axis
17 {
18
19 private:
20 int type; // type == 1, +
21 // type == 2, |_
22 double maxValue ;
23 double minValue ;
24 double adjust ;
25 int numOfTickers ;
26 const char *name;
27 double tickers[11];
28 SbColor color;
29 bool show3D;
30 // which == 1, X
31 int which; // which axis to draw, which == 0, Y
32 // which ==-1, Z
33
34 SoSeparator * drawTicker(float pos, float height);
35 SoSeparator * drawScale(float pos, float scale);
36 SoSeparator * drawAxisName(float pos);
37 SoSeparator * drawArrow();
38
39 public:
40 Axis();
41 Axis(int type, double maxValue, double minValue, int numOfTickers, const char* name, int wh, SbColor color);
42 Axis(bool td, int type, double maxValue, double minValue, int numOfTickers, const char* name, int wh, SbColor color);
43 ~Axis();
44
45 SoSeparator *createAxis();
46
47 void setMaxValue(double mx){ maxValue = mx; }
48 void setMinValue(double mi){ minValue = mi; }
49 void setNumOfTicker(int it){ numOfTickers = it; }
50 void setName(const char* anName){ name = anName; }
51 void set(int type, double maxValue, double minValue, int numOfTickers, const char * name, int wh, SbColor color);
52
53 };
54