source: anuga_work/development/anugavis/src/height_quantity.hh @ 5598

Last change on this file since 5598 was 5598, checked in by jack, 14 years ago

Progress on height quantities.

File size: 1.1 KB
Line 
1#ifndef HEIGHT_QUANTITY_HH
2#define HEIGHT_QUANTITY_HH
3
4/* An individual height quantity to render. */
5
6#ifdef HAVE_CONFIG_H
7#  include "config.h"
8#endif
9
10#include <string>
11
12#ifdef HAVE_GL_GL_H
13#  include <GL/gl.h>
14#elif HAVE_OPENGL_GL_H
15#  include <OpenGL/gl.h>
16#endif
17
18using std::string;
19
20/* HeightQuantity instances cannot be shared amongst different
21   AnugaVis instances. This shouldn't matter since AnugaVis'
22   initialisation does SDL initialisation and that should only happen
23   once.
24*/
25
26class HeightQuantity {
27public:
28  HeightQuantity(const string &name,
29                 const GLdouble offset, GLdouble scale,
30                 GLfloat red, GLfloat green, GLfloat blue);
31  ~HeightQuantity(void);
32  void draw(int frame);
33  const string &get_name(void);
34  void set_dynamic(bool dynamic);
35  GLdouble offset;
36  GLdouble scale;
37  GLfloat red;
38  GLfloat green;
39  GLfloat blue;
40private:
41  void compile(int frame);
42  string name;
43  int frame_number; /* The most recently drawn frame (i.e., the one
44                       cached in the display list. */
45  bool dynamic;
46  GLuint display_list;
47};
48
49#endif
Note: See TracBrowser for help on using the repository browser.