20 #include <osgText/Text>
21 #include <osg/Geometry>
22 #include <osgViewer/Viewer>
38 void setPosition(
const agx::Vec2& position );
47 virtual void uninitialize( osg::Group* sceneData ) = 0;
48 virtual bool isValid()
const = 0;
49 virtual void update() = 0;
50 virtual bool match(
const void* obj )
const = 0;
80 PickHandler( osgViewer::Viewer *viewer, osg::Group *scene=
nullptr);
87 void setActivateModKeyMask(
unsigned int modKey );
90 void setActivateMouseButton(
unsigned int mouse);
93 unsigned int getActivateModKeyMask()
const;
96 unsigned int getActivateMouseButton()
const;
106 const osg::Camera *getCamera()
const;
108 virtual bool keyboard(
int key,
unsigned int modKeyMask,
float x,
float y,
bool keydown);
116 virtual bool mouseDragged(
MouseButtonMask buttonMask,
float x,
float y);
117 virtual void update(
float x,
float y);
126 unsigned int m_modKeyMask;
128 osg::Matrix m_cameraMatrix;
129 osg::observer_ptr< osgViewer::Viewer > m_viewer;
130 osg::observer_ptr< osg::Group > m_scene;
131 osg::observer_ptr< osg::Camera > m_camera;
133 unsigned int m_activateModKeyMask;
134 unsigned int m_activateMouseKey;
141 void createMouseSpringRendering(
float scale);
143 void updateRenderState();
144 void setCamera(osg::Camera *camera);
150 void updateClickedGeometry(MouseState state,
float x,
float y);
154 void startPick(
float x,
float y);
155 void updatePanels(
float x,
float y);
159 void traverseParticles();
162 bool mouseDown(MouseButtonMask button,
float x,
float y);
163 bool mouseDownLeftButton(
float x,
float y);
164 bool mouseDownMiddleButton(
float x,
float y);
165 bool mouseDownRightButton(
float x,
float y);
175 bool m_moveUnphysically;
186 osg::PositionAttitudeTransform *m_mouseAttachTransform;
187 osg::PositionAttitudeTransform *m_mousePositionTransform;
188 osg::Geometry *m_mouseSpringLine;
189 osg::observer_ptr< osg::Switch > m_mouseMarkerSwitch;
192 osg::observer_ptr< osg::Switch > m_sphereSwitch;
194 float m_mousePickingGraphicsScale;