diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-01-24 03:02:31 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-01-24 03:02:31 (GMT) |
commit | 1e7636e364535c78e4eebd36666bac5d352c3608 (patch) | |
tree | 5479c9229973795a771f912f3c3414f2075f2875 /src/OffscreenView.h | |
parent | 1bec7aad09631d3f86874ead2c26335bc897fde5 (diff) |
add files removed from test path
Diffstat (limited to 'src/OffscreenView.h')
-rw-r--r-- | src/OffscreenView.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/OffscreenView.h b/src/OffscreenView.h new file mode 100644 index 0000000..8b98b29 --- /dev/null +++ b/src/OffscreenView.h @@ -0,0 +1,45 @@ +#ifndef OFFSCREENVIEW_H_ +#define OFFSCREENVIEW_H_ + +#include "OffscreenContext.h" +#include <Eigen/Core> +#include <Eigen/Geometry> +#include <string> +#ifndef _MSC_VER +#include <stdint.h> +#endif + +class OffscreenView +{ +public: + OffscreenView(size_t width, size_t height); + ~OffscreenView(); + void setRenderer(class Renderer* r); + + void setCamera(const Eigen::Vector3d &pos, const Eigen::Vector3d ¢er); + void initializeGL(); + void resizeGL(int w, int h); + void setupPerspective(); + void setupOrtho(bool offset=false); + void paintGL(); + bool save(const char *filename); + std::string getInfo(); + + GLint shaderinfo[11]; + OffscreenContext *ctx; + size_t width; + size_t height; +private: + Renderer *renderer; + double w_h_ratio; + Eigen::Vector3d object_rot; + Eigen::Vector3d camera_eye; + Eigen::Vector3d camera_center; + + bool orthomode; + bool showaxes; + bool showfaces; + bool showedges; +}; + +#endif |