Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int loadMapData(osg::Group* root) {
- // Load the map
- osg::Node* map = osgDB::readNodeFile("/home/dien/Desktop/osgearth/tests/BacBo/Map.earth");
- // Find the MapNode
- osgEarth::MapNode* mapNode = osgEarth::MapNode::get( map );
- root->addChild( mapNode );
- //Load topograph
- osg::Node* data = osgDB::readNodeFile("/home/dien/Desktop/osgearth/tests/BacBo/n20_e102_3arc_v2.earth");
- osgEarth::MapNode* mapData = osgEarth::MapNode::get( data );
- if (!mapData)
- {
- OE_NOTICE << "Could not find MapNode " << std::endl;
- return 0;
- }
- root->addChild( mapData );
- //Load topograph2
- osg::Node* data2 = osgDB::readNodeFile("/home/dien/Desktop/osgearth/tests/BacBo/n20_e103_3arc_v2.earth");
- osgEarth::MapNode* mapData2 = osgEarth::MapNode::get( data2 );
- if (!mapData2)
- {
- OE_NOTICE << "Could not find MapNode " << std::endl;
- return 0;
- }
- root->addChild( mapData2 );
- return 1;
- }
- //main
- // osg::Group* root = new osg::Group();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement