source: tags/arb_5.5/RNA3D/RNA3D_OpenGLGraphics.hxx

Last change on this file was 6103, checked in by westram, 15 years ago
  • removed useless typedefs
  • structs are public classes
  • 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(void);
35    virtual  ~OpenGLGraphics(void);
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    void PrintComment(float x, float y, float z, char *s);
42
43    void init_font(GLuint base, char* f);
44    void print_string(GLuint base, char* s);
45    void InitMainFont(char* f);
46
47    void SetOpenGLBackGroundColor();
48    ColorRGBf ConvertGCtoRGB(int gc);
49    void SetColor(int gc);
50    ColorRGBf GetColor(int gc);
51
52    void DrawBox(float x, float y, float width, float height);
53};
54
55#else
56#error RNA3D_OpenGLGraphics.hxx included twice
57#endif // RNA3D_OPENGLGRAPHICS_HXX
Note: See TracBrowser for help on using the repository browser.