Last change
on this file since 5685 was
5605,
checked in by jack, 17 years ago
|
Extract the height data from the NetCDF file.
|
File size:
1.3 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 | #include <boost/shared_array.hpp> |
---|
12 | #include <boost/shared_ptr.hpp> |
---|
13 | #ifdef HAVE_GL_GL_H |
---|
14 | # include <GL/gl.h> |
---|
15 | #elif HAVE_OPENGL_GL_H |
---|
16 | # include <OpenGL/gl.h> |
---|
17 | #endif |
---|
18 | #include "sww_file.hh" |
---|
19 | |
---|
20 | using boost::shared_array; |
---|
21 | using boost::shared_ptr; |
---|
22 | using std::string; |
---|
23 | |
---|
24 | /* HeightQuantity instances cannot be shared amongst different |
---|
25 | AnugaVis instances. This shouldn't matter since AnugaVis' |
---|
26 | initialisation does SDL initialisation and that should only happen |
---|
27 | once. |
---|
28 | */ |
---|
29 | |
---|
30 | class HeightQuantity { |
---|
31 | public: |
---|
32 | HeightQuantity(const string &name, |
---|
33 | const GLdouble offset, GLdouble scale, |
---|
34 | GLfloat red, GLfloat green, GLfloat blue); |
---|
35 | ~HeightQuantity(void); |
---|
36 | void draw(int frame); |
---|
37 | void set_SWWFile(const shared_ptr<SWWFile> &file); |
---|
38 | GLdouble offset; |
---|
39 | GLdouble scale; |
---|
40 | GLfloat red; |
---|
41 | GLfloat green; |
---|
42 | GLfloat blue; |
---|
43 | private: |
---|
44 | void compile(int frame); |
---|
45 | string name; |
---|
46 | int frame_number; /* The most recently drawn frame (i.e., the one |
---|
47 | cached in the display list. */ |
---|
48 | int varid; |
---|
49 | bool dynamic; |
---|
50 | GLuint display_list; |
---|
51 | shared_array<float> points; |
---|
52 | shared_ptr<SWWFile> sww_file; |
---|
53 | }; |
---|
54 | |
---|
55 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.