25 #ifndef WPICKHANDLER_H
26 #define WPICKHANDLER_H
31 #include <boost/signals2/signal.hpp>
34 #include <osgViewer/View>
37 #include "WPickInfo.h"
67 bool handle(
const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa );
74 virtual void pick( osgViewer::View* view,
const osgGA::GUIEventAdapter& ea );
134 #endif // WPICKHANDLER_H
bool m_inPickMode
if true, the pick handler currently is in pick mode.
void setPaintMode(int mode)
setter for paint mode
WPickInfo m_hitResult
Textual representation of the result of a pick.
void updatePickInfoModifierKeys(WPickInfo *pickInfo)
Sets the current modifiers to the provided pickInfo.
virtual void pick(osgViewer::View *view, const osgGA::GUIEventAdapter &ea)
Send a pick signal with the pick information as string.
int m_paintMode
the paint mode
Class to handle events with a pick.
WPickHandler()
Constructor that initalizes members with sensible defaults.
boost::signals2::signal1< void, WPickInfo > * getPickSignal()
returns the m_pickSignal to for registering to it.
WPickInfo getHitResult()
Gives information about the picked object.
virtual void unpick()
Send a pick signal with the string "unpick".
bool m_ctrl
is ctrl pressed?
bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
Deals with the events found by the osg.
int32_t m_scrollWheel
the virtual value of the scrollwheel
Encapsulates info for pick action.
WPickInfo m_startPick
indicates what was first picked. Should be "" after unpick.
boost::signals2::signal1< void, WPickInfo > m_pickSignal
One can register to this signal to receive pick events.
virtual ~WPickHandler()
Virtual destructor needed because of virtual function.
std::string m_viewerName
which viewer sends the signal
WMouseButton
Different types of mouse buttons.
bool m_shift
is shift pressed?
WPickInfo::WMouseButton m_mouseButton
stores mouse button that initiated the pick