Advertisement

osgEarth的Rex引擎原理分析(一零四)re怎样绘制地球地图

阅读量:

目标:(一零三)中的问题186

参考代码osgearth_annotation.cpp;它并不是直接绘制在瓦片上;由于覆盖了瓦片边界线;即完成后的 Rex 渲染流程中;与绘制一个几何图形相比较;两者本质上没有区别。

复制代码
     osgEarth::Annotation::ImageOverlay* imageOverlay = 0L;

    
     osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile( "fj.jpg" );
    
     if (image.valid())
    
     {
    
     imageOverlay = new osgEarth::Annotation::ImageOverlay(mapNode, image.get());
    
     imageOverlay->setBounds( Bounds( 100.0, 30.0, 120.0, 40.0) );
    
     osg::Group* annoGroup = new osg::Group();
    
     MapNode::get(node)->addChild( annoGroup );
    
     annoGroup->addChild( imageOver

全部评论 (0)

还没有任何评论哟~