SHARE
TWEET

Untitled

a guest May 16th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int loadMapData(osg::Group* root) {
  2.     // Load the map
  3.     osg::Node* map = osgDB::readNodeFile("/home/dien/Desktop/osgearth/tests/BacBo/Map.earth");
  4.     // Find the MapNode
  5.     osgEarth::MapNode* mapNode = osgEarth::MapNode::get( map );
  6.     root->addChild( mapNode );
  7.  
  8.     //Load topograph
  9.     osg::Node* data = osgDB::readNodeFile("/home/dien/Desktop/osgearth/tests/BacBo/n20_e102_3arc_v2.earth");
  10.     osgEarth::MapNode* mapData = osgEarth::MapNode::get( data );
  11.     if (!mapData)
  12.     {
  13.         OE_NOTICE << "Could not find MapNode " << std::endl;
  14.         return 0;
  15.     }
  16.     root->addChild( mapData );
  17.  
  18.     //Load topograph2
  19.     osg::Node* data2 = osgDB::readNodeFile("/home/dien/Desktop/osgearth/tests/BacBo/n20_e103_3arc_v2.earth");
  20.     osgEarth::MapNode* mapData2 = osgEarth::MapNode::get( data2 );
  21.     if (!mapData2)
  22.     {
  23.         OE_NOTICE << "Could not find MapNode " << std::endl;
  24.         return 0;
  25.     }
  26.     root->addChild( mapData2 );
  27.  
  28.     return 1;
  29. }
  30.  
  31. //main
  32. //    osg::Group* root = new osg::Group();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top