17 #ifndef GEPETTO_GUI_PICK_HANDLER_HH
18 #define GEPETTO_GUI_PICK_HANDLER_HH
20 #include <QModelIndex>
24 #include <osg/ref_ptr>
25 #include <osgGA/GUIEventHandler>
28 class LineSegmentIntersector;
33 class PointIntersector;
41 virtual bool handle(
const osgGA::GUIEventAdapter& ea,
42 osgGA::GUIActionAdapter& aa);
44 void getUsage(osg::ApplicationUsage& usage)
const;
47 typedef osg::ref_ptr<osgUtil::LineSegmentIntersector> LineSegmentIntersector;
49 void computeLineIntersection(osgGA::GUIActionAdapter& aa,
const float& x,
53 LineSegmentIntersector computeLineOrPointIntersection(
54 osgGA::GUIActionAdapter& aa,
const float& x,
const float& y);
56 void selectionNodeUnderCursor(osgGA::GUIActionAdapter& aa,
const float& x,
57 const float& y,
int modMask);
59 void centerViewToMouse(osgGA::GUIActionAdapter& aa,
const float& x,
62 void setCameraToSelected(osgGA::GUIActionAdapter& aa,
bool zoom);
70 LineSegmentIntersector lineIntersector_;
71 osg::ref_ptr<PointIntersector> pointIntersector_;
76 #endif // GEPETTO_GUI_PICK_HANDLER_HH