|
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 = new osgEarth::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文件
|
|