source: branches/blt4/packages/vizservers/nanovis/Grid.h @ 1816

Last change on this file since 1816 was 934, checked in by gah, 16 years ago

Makefile cleanup: add library for transfer-function, no longer compile Socket.o, etc.

File size: 954 bytes
Line 
1#ifndef _AXIS_H_
2#define _AXIS_H_
3
4#include <R2/R2Fonts.h>
5#include "Axis.h"
6#include "AxisRange.h"
7
8class RGBA {
9public:
10    float red, green, blue, alpha;
11    RGBA(float r, float g, float b, float a) :
12        red(r), green(g), blue(b), alpha(a)
13    { /*empty*/ }
14    void SetColor(float r, float g, float b, float a) {
15        red   = r;
16        green = g;
17        blue  = b;
18        alpha = a;
19    }
20};
21
22class Grid {
23    RGBA _axisColor, _majorColor, _minorColor;
24    R2Fonts* _font;
25    bool _visible;
26
27public :
28    Axis xAxis;
29    Axis yAxis;
30    Axis zAxis;
31
32    Grid();
33    bool isVisible() const {
34        return _visible;
35    }
36    void setVisible(bool visible) {
37        _visible = visible;
38    }
39    void setAxisColor(float r, float g, float b, float a) {
40        _axisColor.SetColor(r, g, b, a);
41    }
42    void setLineColor(float r, float g, float b, float a) {
43        _majorColor.SetColor(r, g, b, a);
44        _minorColor = _majorColor;
45    }
46    void render();
47    void setFont(R2Fonts* font);
48};
49
50
51#endif
Note: See TracBrowser for help on using the repository browser.