#ifndef HEIGHT_QUANTITY_HH #define HEIGHT_QUANTITY_HH /* An individual height quantity to render. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #ifdef HAVE_GL_GL_H # include #elif HAVE_OPENGL_GL_H # include #endif #include "sww_file.hh" using boost::shared_array; using boost::shared_ptr; using std::string; /* HeightQuantity instances cannot be shared amongst different AnugaVis instances. This shouldn't matter since AnugaVis' initialisation does SDL initialisation and that should only happen once. */ class HeightQuantity { public: HeightQuantity(const string &name, const GLdouble offset, GLdouble scale, GLfloat red, GLfloat green, GLfloat blue); ~HeightQuantity(void); void draw(int frame); void set_SWWFile(const shared_ptr &file); GLdouble offset; GLdouble scale; GLfloat red; GLfloat green; GLfloat blue; private: void compile(int frame); string name; int frame_number; /* The most recently drawn frame (i.e., the one cached in the display list. */ bool dynamic; GLuint display_list; shared_array points; shared_ptr sww_file; }; #endif