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/OffscreenView.cc | |
parent | 5389107aa684ab99701e238a7297f07b35f7d521 (diff) |
put qglview.h into mainwin for deps. unify camera functions into glview.
remove duplicate code.
Diffstat (limited to 'src/OffscreenView.cc')
-rw-r--r-- | src/OffscreenView.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/OffscreenView.cc b/src/OffscreenView.cc index da129d8..0604ba4 100644 --- a/src/OffscreenView.cc +++ b/src/OffscreenView.cc @@ -7,12 +7,16 @@ #include <cstdlib> #include <sstream> -#define FAR_FAR_AWAY 100000.0 - OffscreenView::OffscreenView(size_t width, size_t height) - : orthomode(false), showaxes(false), showfaces(true), showedges(false), - object_rot(35, 0, 25), camera_eye(0, 0, 0), camera_center(0, 0, 0) { + orthomode = false; + showaxes = false; + showfaces = true; + showedges = false; + object_rot << 35, 0, 25; + camera_eye << 0, 0, 0; + camera_center << 0, 0, 0; + for (int i = 0; i < 10; i++) this->shaderinfo[i] = 0; this->ctx = create_offscreen_context(width, height); if ( this->ctx == NULL ) throw -1; @@ -61,7 +65,7 @@ void OffscreenView::resizeGL(int w, int h) w_h_ratio = sqrt((double)w / (double)h); } -void OffscreenView::setupGimbalPerspective() +/*void OffscreenView::setupGimbalPerspective() { fprintf(stderr, "gimbal camera not implemented in Offscreen View\n"); } @@ -88,7 +92,7 @@ void OffscreenView::setupOrtho(bool offset) glOrtho(-w_h_ratio*l, +w_h_ratio*l, -(1/w_h_ratio)*l, +(1/w_h_ratio)*l, -FAR_FAR_AWAY, +FAR_FAR_AWAY); -} +}*/ void OffscreenView::paintGL() { @@ -161,9 +165,11 @@ std::string OffscreenView::getRendererInfo() return out.str(); } +/* void OffscreenView::setCamera(const Eigen::Vector3d &pos, const Eigen::Vector3d ¢er) { this->camera_eye = pos; this->camera_center = center; } +*/ |