Changeset 182
- Timestamp:
- Jan 7, 2011, 12:05:14 PM (14 years ago)
- Location:
- osgVisual/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/include/sky_Silverlining/visual_skySilverLining.h
r145 r182 65 65 * @param viewer_ : Pointer to the applications viewer 66 66 * @param configFileName : Filename of the XML configfile to read the configuration from. Currently not used because skySilverlining currently does not need any configuration parameters. 67 */ 68 visual_skySilverLining(osgViewer::Viewer* viewer_, std::string configFileName); 67 * @param disabled : Flag to the caller which indicates if the sky was enabled or disabled by the XML configuration file. 68 */ 69 visual_skySilverLining(osgViewer::Viewer* viewer_, std::string configFileName, bool& disabled); 69 70 70 71 /** -
osgVisual/trunk/src/core/visual_core.cpp
r175 r182 77 77 #ifdef USE_SKY_SILVERLINING 78 78 // Initialize sky 79 sky = new visual_skySilverLining( viewer, configFilename ); 80 sky->init(distortedSceneGraph, rootNode); // Without distortion: distortedSceneGraph=NULL 79 bool disabled = false; // to ask if the skyp is disabled or enabled 80 sky = new visual_skySilverLining( viewer, configFilename, disabled ); 81 if(disabled) 82 sky = NULL; 83 if(sky.valid()) 84 sky->init(distortedSceneGraph, rootNode); // Without distortion: distortedSceneGraph=NULL 81 85 #endif 82 86 … … 404 408 { 405 409 406 // Sky settings: 407 sky->setTime(15,30,00); 408 sky->setVisibility(50000); 409 sky->addWindVolume( 0.0, 15000.0, 25.0, 90.0 ); 410 411 //sky->addCloudLayer( 0, 20000, 20000, 600.0, 1000.0, 0.5, CUMULONIMBUS_CAPPILATUS ); 412 //sky->addCloudLayer( 1, 5000000, 5000000, 600.0, 7351.0, 0.2, CIRRUS_FIBRATUS ); 413 //sky->addCloudLayer( 2, 50000, 50000, 600.0, 7351.0, 0.2, CIRROCUMULUS ); 414 ///sky->addCloudLayer( 2, 100000, 100000, 600.0, 2351.0, 0.75, STRATUS ); 415 sky->addCloudLayer( 3, 50000, 50000, 1300.0, 700.0, 0.07, CUMULUS_CONGESTUS ); 416 //sky->addCloudLayer( 1, 100000, 100000, 3500.0, 2000.0, 0.30, STRATOCUMULUS ); 417 418 //sky->setSlotPrecipitation( 1, 0.0, 0.0, 0.0, 25.0 ); 410 // Sky settings: 411 if(sky.valid()) 412 { 413 sky->setTime(15,30,00); 414 sky->setVisibility(50000); 415 sky->addWindVolume( 0.0, 15000.0, 25.0, 90.0 ); 416 417 //sky->addCloudLayer( 0, 20000, 20000, 600.0, 1000.0, 0.5, CUMULONIMBUS_CAPPILATUS ); 418 //sky->addCloudLayer( 1, 5000000, 5000000, 600.0, 7351.0, 0.2, CIRRUS_FIBRATUS ); 419 //sky->addCloudLayer( 2, 50000, 50000, 600.0, 7351.0, 0.2, CIRROCUMULUS ); 420 ///sky->addCloudLayer( 2, 100000, 100000, 600.0, 2351.0, 0.75, STRATUS ); 421 sky->addCloudLayer( 3, 50000, 50000, 1300.0, 700.0, 0.07, CUMULUS_CONGESTUS ); 422 //sky->addCloudLayer( 1, 100000, 100000, 3500.0, 2000.0, 0.30, STRATOCUMULUS ); 423 424 //sky->setSlotPrecipitation( 1, 0.0, 0.0, 0.0, 25.0 ); 425 } 419 426 420 427 -
osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp
r144 r182 19 19 using namespace osgVisual; 20 20 21 visual_skySilverLining::visual_skySilverLining(osgViewer::Viewer* viewer_, std::string configFileName )22 { 23 OSG_NOTIFY( osg::ALWAYS ) << "Initialize visual_skySilverlining..." << std::endl;21 visual_skySilverLining::visual_skySilverLining(osgViewer::Viewer* viewer_, std::string configFileName, bool& disabled) 22 { 23 OSG_NOTIFY( osg::ALWAYS ) << "Initialize visual_skySilverlining..."; 24 24 25 25 atmosphereInitialized = false; … … 35 35 cloudLayerSlots.back().slot_id = i; 36 36 } 37 38 // Check if the module is en- or diabled by XML configuration. 39 xmlDoc* tmpDoc; 40 xmlNode* config = util::getModuleXMLConfig( configFileName, "sky_silverlining", tmpDoc, disabled ); 41 if( disabled) 42 OSG_NOTIFY( osg::ALWAYS ) << "..disabled by XML configuration file." << std::endl; 43 else 44 OSG_NOTIFY( osg::ALWAYS ) << std::endl; 45 if(config) 46 xmlFreeDoc(tmpDoc); xmlCleanupParser(); 47 37 48 } 38 49
Note: See TracChangeset
for help on using the changeset viewer.