source: experimental/distortionNG/distortionNG.h @ 329

Last change on this file since 329 was 329, checked in by Torben Dannhauer, 12 years ago
File size: 951 bytes
Line 
1#pragma once
2
3#include<osg/Referenced>
4#include<osg/Geometry>
5#include<osg/MatrixTransform>
6
7#include<osgGA/GUIEventHandler>
8
9#include<osgViewer/Viewer>
10
11
12
13
14class distortionHandler : public osgGA::GUIEventHandler
15{
16
17public:
18        distortionHandler( osg::Camera* camera, osg::Geometry* distortionMesh )
19    : _highlighter(0), _camera(camera), _distortionMesh(distortionMesh), _highlightColor( osg::Vec4(1.0f, 1.0f, 0.0f, 1.0f) ) {}
20
21    void computeSelectedVertex( osgUtil::LineSegmentIntersector::Intersection& result );
22    bool handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa );
23
24        osg::Geode* createVertexHighlighter();
25
26protected:
27        osg::ref_ptr<osg::Geometry> _highlighter;
28    osg::observer_ptr<osg::Camera> _camera;
29        osg::Geometry* _distortionMesh;
30        const osg::Vec4 _highlightColor;
31};
32
33
34
35class distortionNG : public osg::Referenced
36{
37
38public:
39        distortionNG();
40        virtual ~distortionNG();
41};
Note: See TracBrowser for help on using the repository browser.