直接上代码:
qt+osgearth 加载火箭模型并飞行
#include <osgViewer/Viewer>
#include <osgEarth/EarthManipulator>
#include <osgDB/ReadFile>
#include <osg/Geode>
#include <osg/MatrixTransform>
#include <osg/LineWidth>
#include <osg/LineStipple>
#include <QWidget>
#include <osgViewer/Viewer>
#include <osg/Node>
#include <osgEarth/Map>
#include <osgEarth/Sky>
#include <osgEarth/Utils>
#include <osgEarth/Ephemeris>
#include <osgEarthDrivers/sky_gl/GLSkyNode>
#include<osg/PositionAttitudeTransform>
#include <osgEarth/GDAL>
#include <osgEarth/URI>
#include <osgEarth/MBTiles>
#include <osgEarth/ShaderGenerator>
#include <osgEarth/GeoTransform>
#include <osg/ShapeDrawable>
#include <osgDB/ReadFile>
#include <osgGA/TrackballManipulator>
#include<osgGA/FlightManipulator>
#include <osgViewer/View>
#include <osg/ArgumentParser>
#include <osgGA/CameraManipulator>
#include <osgEarth/MapNode>
#include <osgEarth/Map>
#include <osgEarth/MapNode>
#include <osgEarth/TMS>
#include <osgEarth/EarthManipulator>
#include <osg/ArgumentParser>
#include <osgDB/ReadFile>
#include <osgGA/TrackballManipulator>
#include<osgGA/FlightManipulator>
#include <osgViewer/View>
#include <osgQOpenGL/osgQOpenGLWidget>
#include <osg/Timer>
#include <osg/ArgumentParser>
#include <osgGA/CameraManipulator>
#include <osgEarth/ElevationQuery>
#include "osgEarthDrivers\sky_simple\SimpleSkyNode" //for the sky
#include "osgEarthDrivers\sky_simple\SimpleSkyOptions" //for the sky
#include "src/pugiconfig.hpp"
#include "src/pugixml.hpp"
#include "osgEarth/Style"
#include "osgEarth/PlaceNode"
#include "osg/LineWidth"
#include "osg/LineStipple"
#include