diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-02-24 00:50:20 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-02-24 00:50:20 (GMT) |
commit | 0f977609b40d5a6b6b5237060198e6dd97df06c5 (patch) | |
tree | 43c93a204f677ceef9c5b02b3ee28643c2acee12 /src/GLView.h | |
parent | 5389107aa684ab99701e238a7297f07b35f7d521 (diff) |
put qglview.h into mainwin for deps. unify camera functions into glview.
remove duplicate code.
Diffstat (limited to 'src/GLView.h')
-rw-r--r-- | src/GLView.h | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/src/GLView.h b/src/GLView.h index d6e0236..32e3898 100644 --- a/src/GLView.h +++ b/src/GLView.h @@ -11,23 +11,41 @@ #include <iostream> #include "renderer.h" +#define FAR_FAR_AWAY 100000.0 + class GLView { public: + GLView(); void setRenderer(Renderer* r); - Renderer *renderer = 0; + virtual bool save(const char *filename) = 0; + Renderer *renderer; /* void initializeGL(); // void resizeGL(int w, int h); // - void setGimbalCamera(const Eigen::Vector3d &pos, const Eigen::Vector3d &rot, double distance); // - void setupGimbalPerspective(); // - void setupGimbalOrtho(double distance, bool offset=false); // +*/ + void setGimbalCamera(const Eigen::Vector3d &pos, const Eigen::Vector3d &rot, double distance); + void setupGimbalPerspective(); + void setupGimbalOrtho(double distance, bool offset=false); + + void setCamera(const Eigen::Vector3d &pos, const Eigen::Vector3d ¢er); + void setupPerspective(); + void setupOrtho(bool offset=false); - void setCamera(const Eigen::Vector3d &pos, const Eigen::Vector3d ¢er); // - void setupPerspective(); // - void setupOrtho(bool offset=false); // + double viewer_distance;// + double w_h_ratio;// + bool orthomode;// + bool showaxes;// + bool showfaces;// + bool showedges;// + Eigen::Vector3d object_trans; + Eigen::Vector3d object_rot; + Eigen::Vector3d camera_eye; + Eigen::Vector3d camera_center; + +/* void paintGL(); // bool save(const char *filename); // //bool save(std::ostream &output); // not implemented in qgl? |