17 #ifndef GEPETTO_GUI_PICK_HANDLER_HH
18 #define GEPETTO_GUI_PICK_HANDLER_HH
22 #include <QModelIndex>
25 #include <osg/ref_ptr>
26 #include <osgGA/GUIEventHandler>
29 class LineSegmentIntersector;
34 class PointIntersector;
42 virtual bool handle(
const osgGA::GUIEventAdapter& ea,
43 osgGA::GUIActionAdapter& aa);
45 void getUsage(osg::ApplicationUsage& usage)
const;
48 typedef osg::ref_ptr<osgUtil::LineSegmentIntersector> LineSegmentIntersector;
50 void computeLineIntersection(osgGA::GUIActionAdapter& aa,
const float& x,
54 LineSegmentIntersector computeLineOrPointIntersection(
55 osgGA::GUIActionAdapter& aa,
const float& x,
const float& y);
57 void selectionNodeUnderCursor(osgGA::GUIActionAdapter& aa,
const float& x,
58 const float& y,
int modMask);
60 void centerViewToMouse(osgGA::GUIActionAdapter& aa,
const float& x,
63 void setCameraToSelected(osgGA::GUIActionAdapter& aa,
bool zoom);
71 LineSegmentIntersector lineIntersector_;
72 osg::ref_ptr<PointIntersector> pointIntersector_;
77 #endif // GEPETTO_GUI_PICK_HANDLER_HH