haltl2 发表于 2015-1-30 14:21:35

我想在osg里面直接加载osgearth的模型,不显示

        osg::ref_ptr<osg::Node> earthNode = osgDB::readNodeFile( "E:/osgearth/osgearth/tests/gdal_tiff.earth" );
                osg::ref_ptr<osgEarth::MapNode>mapNode = osgEarth::MapNode::findMapNode( earthNode );
                double graphWidth = 200;
                double graphHeight = 100;
                osg::ref_ptr< osgEarth::Util::TerrainProfileCalculator > calculator = newosgEarth::Util::TerrainProfileCalculator(mapNode,
                        osgEarth::GeoPoint::GeoPoint(mapNode->getMapSRS(), -124.0, 40.0),
                        osgEarth::GeoPoint::GeoPoint(mapNode->getMapSRS(), -75.1, 39.2)
                        );
        /*
                        if (!earthNode)
                        {
                                SHH3D::logError("加载失败了");
                        }
                       
                */
       
                //osgEarth::Util::EarthManipulator* manip = new EarthManipulator();   
                //osg::ref_ptr<osgEarth::Util::EarthManipulator> manip=new osgEarth::Util::EarthManipulator;
                mt->addChild(earthNode);

                return mt.release();




直接加载了,只有osg自己创建的模型,读取的osgearth的模型不出来的,想知道怎么在osg中添加osgearh文件

页: [1]
查看完整版本: 我想在osg里面直接加载osgearth的模型,不显示