MultiTouchTrackballManipulator 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield
  2. *
  3. * This library is open source and may be redistributed and/or modified under
  4. * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
  5. * (at your option) any later version. The full license is in LICENSE file
  6. * included with this distribution, and on the openscenegraph.org website.
  7. *
  8. * This library is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * OpenSceneGraph Public License for more details.
  12. */
  13. #ifndef OSGGA_MULTITOUCH_TRACKBALL_MANIPULATOR
  14. #define OSGGA_MULTITOUCH_TRACKBALL_MANIPULATOR 1
  15. #include <osgGA/TrackballManipulator>
  16. namespace osgGA {
  17. class OSGGA_EXPORT MultiTouchTrackballManipulator : public TrackballManipulator
  18. {
  19. typedef TrackballManipulator inherited;
  20. public:
  21. MultiTouchTrackballManipulator( int flags = DEFAULT_SETTINGS );
  22. MultiTouchTrackballManipulator( const MultiTouchTrackballManipulator& tm,
  23. const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY );
  24. META_Object( osgGA, MultiTouchTrackballManipulator );
  25. bool handle( const GUIEventAdapter& ea, GUIActionAdapter& us );
  26. protected:
  27. virtual void handleMultiTouchDrag(const GUIEventAdapter* now, const GUIEventAdapter* last, const double eventTimeDelta);
  28. osg::ref_ptr<GUIEventAdapter> _lastEvent;
  29. };
  30. }
  31. #endif /* OSGGA_MULTITOUCH_TRACKBALL_MANIPULATOR */