25 #ifndef WPICKHANDLER_H
26 #define WPICKHANDLER_H
30 #include <boost/signals2/signal.hpp>
32 #include <osgViewer/View>
35 #include "WPickInfo.h"
65 bool handle(
const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa );
72 virtual void pick( osgViewer::View* view,
const osgGA::GUIEventAdapter& ea );
Class to handle events with a pick.
virtual void unpick()
Send a pick signal with the unpickString.
WPickInfo m_hitResult
Textual representation of the result of a pick.
WPickHandler()
Constructor that initalizes members with sensible defaults.
bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
Deals with the events found by the osg.
bool m_shift
is shift pressed?
WPickInfo m_startPick
indicates what was first picked. Should be "" after unpick.
boost::signals2::signal< void(WPickInfo) > m_pickSignal
One can register to this signal to receive pick events.
std::string m_viewerName
which viewer sends the signal
void updatePickInfoModifierKeys(WPickInfo *pickInfo)
Sets the current modifiers to the provided pickInfo.
bool m_ctrl
is ctrl pressed?
boost::signals2::signal< void(WPickInfo) > * getPickSignal()
virtual void pick(osgViewer::View *view, const osgGA::GUIEventAdapter &ea)
Send a pick signal with the pick information as string.
WPickInfo::WMouseButton m_mouseButton
stores mouse button that initiated the pick
bool m_inPickMode
if true, the pick handler currently is in pick mode.
WPickInfo getHitResult()
Gives information about the picked object.
int32_t m_scrollWheel
the virtual value of the scrollwheel
virtual ~WPickHandler()
Virtual destructor needed because of virtual function.
bool m_paintMode
the paint mode
OW_API_DEPRECATED void setPaintMode(int mode)
setter for paint mode
static const std::string unpickString
The string indicating picking has stopped.
Encapsulates info for pick action.
WMouseButton
Different types of mouse buttons.
#define OW_API_DEPRECATED
In order to mark functions for the compiler as deprecated we need to put this before each deprecated ...