#include <map>
#include <osg/Quat>
#include <osgGA/MatrixManipulator>
+#include <osgViewer/ViewerEventHandlers>
#include "fg_os.hxx"
+namespace flightgear
+{
class FGManipulator : public osgGA::MatrixManipulator {
public:
FGManipulator();
fgKeyHandler keyHandler;
fgMouseClickHandler mouseClickHandler;
fgMouseMotionHandler mouseMotionHandler;
+ osg::ref_ptr<osgViewer::StatsHandler> statsHandler;
+ osg::ref_ptr<osgGA::GUIEventAdapter> statsEvent;
+ int statsType;
int currentModifiers;
- // work-around for OSG bug
- int osgModifiers;
- typedef std::map<int, osgGA::GUIEventAdapter::ModKeyMask> KeyMaskMap;
- KeyMaskMap keyMaskMap;
std::map<int, int> numlockKeyMap;
osg::Vec3d position;
osg::Quat attitude;
// workaround for osgViewer double scroll events
bool scrollButtonPressed;
int release_keys[128];
+ void handleStats(osgGA::GUIActionAdapter& us);
};
+
+void eventToWindowCoords(const osgGA::GUIEventAdapter* ea, double& x, double& y);
+void eventToWindowCoordsYDown(const osgGA::GUIEventAdapter* ea,
+ double& x, double& y);
+}
#endif