click_count(0)
{}
+ MouseEvent(const osgGA::GUIEventAdapter& ea):
+ button(ea.getButton()),
+ state(ea.getButtonMask()),
+ mod(ea.getModKeyMask()),
+ click_count(0)
+ {
+ time = ea.getTime();
+ }
+
osg::Vec2f getScreenPos() const { return screen_pos; }
osg::Vec2f getClientPos() const { return client_pos; }
+ osg::Vec2f getLocalPos() const { return local_pos; }
osg::Vec2f getDelta() const { return delta; }
float getScreenX() const { return screen_pos.x(); }
float getClientX() const { return client_pos.x(); }
float getClientY() const { return client_pos.y(); }
+ float getLocalX() const { return local_pos.x(); }
+ float getLocalY() const { return local_pos.y(); }
+
float getDeltaX() const { return delta.x(); }
float getDeltaY() const { return delta.y(); }
osg::Vec2f screen_pos, //<! Position in screen coordinates
client_pos, //<! Position in window/canvas coordinates
+ local_pos, //<! Position in local/element coordinates
delta;
int button, //<! Button for this event
state, //<! Current button state