Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48699 - in sandbox/guigl/boost/guigl/view: . impl
From: stipe_at_[hidden]
Date: 2008-09-10 12:23:11


Author: srajko
Date: 2008-09-10 12:23:10 EDT (Wed, 10 Sep 2008)
New Revision: 48699
URL: http://svn.boost.org/trac/boost/changeset/48699

Log:
navigable offers rotation around two axes
Text files modified:
   sandbox/guigl/boost/guigl/view/impl/navigable.hpp | 5 +++--
   sandbox/guigl/boost/guigl/view/navigable.hpp | 4 ++--
   2 files changed, 5 insertions(+), 4 deletions(-)

Modified: sandbox/guigl/boost/guigl/view/impl/navigable.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/view/impl/navigable.hpp (original)
+++ sandbox/guigl/boost/guigl/view/impl/navigable.hpp 2008-09-10 12:23:10 EDT (Wed, 10 Sep 2008)
@@ -21,7 +21,8 @@
     base_type::draw_prologue();
     glMatrixMode(GL_PROJECTION);
     glPushMatrix();
- glRotated(m_angle, 0, 1, 0);
+ glRotated(m_angle.x, 0, 1, 0);
+ glRotated(m_angle.y, 1, 0, 0);
         glTranslatef(0, 0, -500);
 }
 
@@ -36,7 +37,7 @@
 template<typename BaseView>
 void navigable<BaseView>::draggable_on_drag(const position_type &position)
 {
- m_angle += position.x - base_type::drag_origin().x;
+ m_angle += position - base_type::drag_origin();
     base_type::set_drag_origin(position);
     guigl::window::redraw(*this);
 }

Modified: sandbox/guigl/boost/guigl/view/navigable.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/view/navigable.hpp (original)
+++ sandbox/guigl/boost/guigl/view/navigable.hpp 2008-09-10 12:23:10 EDT (Wed, 10 Sep 2008)
@@ -23,7 +23,7 @@
     template<typename ArgumentPack>
     navigable(const ArgumentPack &args)
         : base_type(args)
- , m_angle(0)
+ , m_angle(0,0)
     {}
 
 protected:
@@ -35,7 +35,7 @@
     friend class draggable<navigable<BaseView>, BaseView>;
 
 private:
- double m_angle;
+ position_type m_angle;
 };
 
 }}}


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk