#pragma once #include #include #include #include #include class distortionHandler : public osgGA::GUIEventHandler { public: distortionHandler( osg::Camera* camera, osg::Geometry* distortionMesh ) : _highlighter(0), _camera(camera), _distortionMesh(distortionMesh), _highlightColor( osg::Vec4(1.0f, 1.0f, 0.0f, 1.0f) ) {} void computeSelectedVertex( osgUtil::LineSegmentIntersector::Intersection& result ); bool handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa ); osg::Geode* createVertexHighlighter(); protected: osg::ref_ptr _highlighter; osg::observer_ptr _camera; osg::Geometry* _distortionMesh; const osg::Vec4 _highlightColor; }; class distortionNG : public osg::Referenced { public: distortionNG(); virtual ~distortionNG(); };