30 #include <boost/shared_ptr.hpp>
31 #include <boost/enable_shared_from_this.hpp>
34 #include <osg/Version>
35 #include <osgGA/DriveManipulator>
36 #include <osgGA/FlightManipulator>
37 #include <osgGA/TerrainManipulator>
38 #include <osgGA/UFOManipulator>
39 #include <osgViewer/View>
43 #if ( ( OPENSCENEGRAPH_MAJOR_VERSION > 2 ) || ( OPENSCENEGRAPH_MAJOR_VERSION == 2 && ( OPENSCENEGRAPH_MINOR_VERSION > 9 || \
44 ( OPENSCENEGRAPH_MINOR_VERSION == 9 && OPENSCENEGRAPH_PATCH_VERSION >= 8 ) ) ) )
45 #include <osgGA/CameraManipulator>
51 #include <osgGA/MatrixManipulator>
54 #include "../common/WColor.h"
55 #include "../common/WFlag.h"
56 #include "../common/WThreadedRunner.h"
57 #include "WExportWGE.h"
58 #include "WGECamera.h"
59 #include "WGEGraphicsWindow.h"
60 #include "WGEGroupNode.h"
61 #include "WPickHandler.h"
69 public boost::enable_shared_from_this< WGEViewer >
84 WGEViewer( std::string name, osg::ref_ptr<osg::Referenced> wdata,
int x,
int y,
int width,
int height,
102 virtual void resize(
int width,
int height );
107 virtual void close();
115 osg::ref_ptr<osgViewer::Viewer> getView();
117 osg::ref_ptr<osgViewer::View> getView();
130 void setCameraManipulator( osg::ref_ptr<osgGA::MatrixManipulator> manipulator );
137 osg::ref_ptr<osgGA::MatrixManipulator> getCameraManipulator();
144 void setCamera( osg::ref_ptr<osg::Camera> camera );
151 osg::ref_ptr<osg::Camera> getCamera();
158 void setScene( osg::ref_ptr< WGEGroupNode > node );
165 osg::ref_ptr< WGEGroupNode > getScene();
172 std::string getName()
const;
178 void setBgColor(
const WColor& bgColor );
185 osg::ref_ptr< WPickHandler > getPickHandler();
192 std::string getOpenGLVendor()
const;
206 osg::ref_ptr< osgViewer::Viewer > m_View;
255 virtual void operator()( osg::RenderInfo& renderInfo )
const;
262 std::string getVendor()
const;
288 #endif // WGEVIEWER_H