source: tags/ms_r16q3/RNA3D/RNA3D_OpenGLGraphics.hxx

Last change on this file was 6383, checked in by westram, 14 years ago
  • removed void
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1// ============================================================ //
2//                                                              //
3//   File      : RNA3D_OpenGLGraphics.hxx                       //
4//   Purpose   :                                                //
5//                                                              //
6//   Institute of Microbiology (Technical University Munich)    //
7//   http://www.arb-home.de/                                    //
8//                                                              //
9// ============================================================ //
10
11#ifndef RNA3D_OPENGLGRAPHICS_HXX
12#define RNA3D_OPENGLGRAPHICS_HXX
13
14struct ColorRGBf {
15    float red, green, blue;
16    ColorRGBf() {}
17    ColorRGBf(float r, float g, float b) { red = r; green = g; blue = b; }
18
19    bool operator==(ColorRGBf c) {
20        if ((red == c.red) && (green == c.green) && (blue == c.blue)) {
21            return true;
22        }
23        else {
24            return false;
25        }
26    }
27};
28
29struct OpenGLGraphics {
30    int       screenXmax, screenYmax, mouseX, mouseY;
31    bool      displayGrid;
32    ColorRGBf ApplicationBGColor;
33
34    OpenGLGraphics();
35    virtual  ~OpenGLGraphics();
36
37    void WinToScreenCoordinates(int x, int y, GLdouble  *screenPos);
38    void ScreenToWinCoordinates(int x, int y, GLdouble *winPos);
39
40    void PrintString(float x, float y, float z, char *s, void *font);
41
42    void init_font(GLuint base, char* f);
43    void print_string(GLuint base, char* s);
44    void InitMainFont(char* f);
45
46    void SetOpenGLBackGroundColor();
47    ColorRGBf ConvertGCtoRGB(int gc);
48    void SetColor(int gc);
49    ColorRGBf GetColor(int gc);
50
51    void DrawBox(float x, float y, float width, float height);
52};
53
54#else
55#error RNA3D_OpenGLGraphics.hxx included twice
56#endif // RNA3D_OPENGLGRAPHICS_HXX
Note: See TracBrowser for help on using the repository browser.