Changeset 192
- Timestamp:
- Jan 11, 2011, 8:32:13 PM (14 years ago)
- Location:
- osgVisual/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/src/core/visual_core.cpp
r191 r192 187 187 bool visual_core::loadTerrain(osg::ArgumentParser& arguments_) 188 188 { 189 osg::ref_ptr<osg::Node> model = osgDB::readNodeFiles( arguments_);189 osg::ref_ptr<osg::Node> model = osgDB::readNodeFiles(util::getTerrainFromXMLConfig(configFilename)); 190 190 if( model.valid() ) 191 191 { -
osgVisual/trunk/src/util/visual_util.cpp
r190 r192 464 464 } 465 465 466 std:: stringutil::getTerrainFromXMLConfig(std::string configFilename)466 std::vector<std::string> util::getTerrainFromXMLConfig(std::string configFilename) 467 467 { 468 468 xmlDoc* tmpDoc; 469 469 xmlNode* sceneryNode = util::getSceneryXMLConfig(configFilename, tmpDoc); 470 std:: string filename = "";470 std::vector<std::string> filenames; 471 471 472 472 // Iterate through nodes and search for terrian entry … … 482 482 std::string attr_name=reinterpret_cast<const char*>(attr->name); 483 483 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 484 if( attr_name == "filename")484 if( attr_name.find("filename") != std::string::npos ) 485 485 { 486 filename = attr_value;486 filenames.push_back(attr_value); 487 487 } 488 488 attr = attr->next; … … 502 502 } 503 503 504 return filename ;504 return filenames; 505 505 } 506 506
Note: See TracChangeset
for help on using the changeset viewer.