原创 Osgearth2.10之添加三維模型

通過ModelNode添加三維模型到地圖,代碼實現如下: m_AnnoGroup = new osg::Group(); m_MapNode->addChild(m_AnnoGroup); osg::ref_ptr<osg::Node>

原创 Osgearth2.10之添加指北針

基於Osgearth對象使用osgEarth::Util::Controls::ImageControl添加指北針,代碼如下: osg::ref_ptr<osg::Image> pCompass = osgDB::readImageFil

原创 Osgearth2.10之集成到Qt5.13

基於ViewerWidget類,通過加載earth文件方式創建三維地球,實現Osgearth在Qt5.13中QWidget顯示 (1)初始化節點 m_Root = new osg::Group(); std::string url = m

原创 Osgearth2.10之添加/刪除圖像

基於Osgearth對象實現圖像的添加/刪除功能 (1)添加圖像 通過Gdal添加GeoTiff圖像,代碼如下: osgEarth::Drivers::GDALOptions layerOpt; layerOpt.url() = osgE

原创 Osgearth2.10之添加/刪除高程

基於Osgearth對象實現高程數據的添加/刪除功能 (1)添加高程數據 通過Gdal添加Tiff數據,代碼如下: osgEarth::Drivers::GDALOptions layerOpt; layerOpt.url() = osg