Changeset 4973 for geovis/trunk/Renderer.cpp
- Timestamp:
- Jan 31, 2015, 11:27:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
geovis/trunk/Renderer.cpp
r4957 r4973 736 736 skyOpts.atmosphericLighting() = true; 737 737 skyOpts.exposure() = 3.0; 738 osgEarth::Util::SkyNode *sky= osgEarth::Util::SkyNode::create(skyOpts, mapNode);739 sky->addChild(mapNode);740 sky->attach(_viewer.get(), 0);741 _sceneRoot = sky;738 _skyNode = osgEarth::Util::SkyNode::create(skyOpts, mapNode); 739 _skyNode->addChild(mapNode); 740 _skyNode->attach(_viewer.get(), 0); 741 _sceneRoot = _skyNode; 742 742 #else 743 743 _sceneRoot = new osg::Group(); … … 745 745 746 746 TRACE("Creating SkyNode"); 747 osgEarth::Util::SkyNode *sky= new osgEarth::Util::SkyNode(map);748 _sceneRoot->addChild( sky);749 sky->setAmbientBrightness(0.2f);750 sky->setDateTime(now);751 sky->attach(_viewer.get(), 0);747 _skyNode = new osgEarth::Util::SkyNode(map); 748 _sceneRoot->addChild(_skyNode.get()); 749 _skyNode->setAmbientBrightness(0.2f); 750 _skyNode->setDateTime(now); 751 _skyNode->attach(_viewer.get(), 0); 752 752 #endif 753 753 } else { … … 811 811 } 812 812 _verticalScale->setScale(scale); 813 _needsRedraw = true; 814 } 815 } 816 817 void Renderer::setEphemerisTime(int year, int month, int day, double hours) 818 { 819 if (_skyNode.valid()) { 820 osgEarth::DateTime time(year, month, day, hours); 821 _skyNode->setDateTime(time); 813 822 _needsRedraw = true; 814 823 }
Note: See TracChangeset
for help on using the changeset viewer.