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
|
Rev | Line | |
---|
[5502] | 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> |
---|
[5600] | 11 | #include <boost/shared_array.hpp> |
---|
| 12 | #include <boost/shared_ptr.hpp> |
---|
[5502] | 13 | #ifdef HAVE_GL_GL_H |
---|
| 14 | # include <GL/gl.h> |
---|
| 15 | #elif HAVE_OPENGL_GL_H |
---|
| 16 | # include <OpenGL/gl.h> |
---|
| 17 | #endif |
---|
[5600] | 18 | #include "sww_file.hh" |
---|
[5502] | 19 | |
---|
[5600] | 20 | using boost::shared_array; |
---|
| 21 | using boost::shared_ptr; |
---|
[5502] | 22 | using std::string; |
---|
| 23 | |
---|
[5598] | 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 | |
---|
[5502] | 30 | class HeightQuantity { |
---|
| 31 | public: |
---|
[5598] | 32 | HeightQuantity(const string &name, |
---|
[5502] | 33 | const GLdouble offset, GLdouble scale, |
---|
| 34 | GLfloat red, GLfloat green, GLfloat blue); |
---|
| 35 | ~HeightQuantity(void); |
---|
| 36 | void draw(int frame); |
---|
[5600] | 37 | void set_SWWFile(const shared_ptr<SWWFile> &file); |
---|
[5502] | 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. */ |
---|
[5605] | 48 | int varid; |
---|
[5502] | 49 | bool dynamic; |
---|
| 50 | GLuint display_list; |
---|
[5600] | 51 | shared_array<float> points; |
---|
| 52 | shared_ptr<SWWFile> sww_file; |
---|
[5502] | 53 | }; |
---|
| 54 | |
---|
| 55 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.