AnimatLab  2
Test
OsgDraggerHandler.h
1 #pragma once
2 
3 namespace OsgAnimatSim
4 {
5  namespace Visualization
6  {
7 
8  class OsgDraggerHandler : public osgGA::GUIEventHandler
9  {
10  private:
11  Simulator *m_lpSim;
12 
13  osg::ref_ptr<osgViewer::Viewer> m_osgViewer;
14  osg::ref_ptr<osg::Viewport> m_osgViewport;
15 
16  osgManipulator::Dragger *m_osgActiveDragger;
17  osgManipulator::PointerInfo m_osgManipInfo;
18 
19  virtual void StartGripDrag();
20  virtual void EndGripDrag();
21 
22  protected:
23  void pick(const osgGA::GUIEventAdapter& ea, GUIActionAdapter& aa);
24 
25  public:
26  OsgDraggerHandler(Simulator *lpSim, osgViewer::Viewer *osgViewer, osg::Viewport *osgViewport = NULL);
27  ~OsgDraggerHandler(void);
28 
30  virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us);
31  };
32 
33  }// end Visualization
34 }// end OsgAnimatSim
35 
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
virtual bool handle(const GUIEventAdapter &ea, GUIActionAdapter &us)