- Timestamp:
- Jun 6, 2011, 11:16:54 PM (13 years ago)
- Location:
- osgVisual/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/bin/osgVisualConfig.xml
r293 r295 37 37 <trackmodel id="2" updater_slot="TRACKING_ID"></trackmodel> 38 38 </models> 39 <datetime day="0" month="0" year="0" hour=" 12" minute="50"></datetime>39 <datetime day="0" month="0" year="0" hour="20" minute="20"></datetime> 40 40 <visibility range="50000" turbidity="2.2" ></visibility> 41 41 <clouds> -
osgVisual/trunk/include/util/visual_util.h
r293 r295 305 305 * @param pAddToThisGroup 306 306 */ 307 static void AddCylinderBetweenPoints(osg::Vec3d StartPoint, osg::Vec3d EndPoint, float radius, float length,osg::Vec4d CylinderColor, osg::Group *pAddToThisGroup);307 static void AddCylinderBetweenPoints(osg::Vec3d StartPoint, osg::Vec3d EndPoint, float radius, osg::Vec4d CylinderColor, osg::Group *pAddToThisGroup); 308 308 309 309 template<class T> -
osgVisual/trunk/src/sky_Silverlining/skySilverLining_skyDrawable.cpp
r293 r295 67 67 atmosphere->GetAmbientColor(&ra, &ga, &ba); 68 68 atmosphere->GetSunOrMoonColor(&rd, &gd, &bd); 69 atmosphere->GetSunOrMoonPosition(&x, &y, &z); 69 //atmosphere->GetSunOrMoonPosition(&x, &y, &z); 70 atmosphere->GetSunOrMoonPositionGeographic(&x, &y, &z); 71 70 72 71 73 direction = osg::Vec3(x, y, z); … … 79 81 direction.normalize(); 80 82 81 //OSG_NOTIFY(osg::ALWAYS) << "Light Vector: X:"<<direction.x()<<" Y:"<<direction.y()<<" Z:"<<direction.z() << std::endl; 82 util::AddCylinderBetweenPoints(osg::Vec3d(0,0,0), direction , 10000.0, 15000000.0, osg::Vec4d(1.0, 1.0, 0.0, 1 ), sceneRoot); 83 //double cx,cy,cz, lat, lon, height; 84 //util::getWGS84ofCamera( _view->getCamera(), sceneRoot, lat, lon, height ); 85 //util::calculateXYZAtWGS84Coordinate(lat, lon, 0, sceneRoot, cx, cy, cz); 86 //util::AddCylinderBetweenPoints(osg::Vec3d(cx,cy,cz), direction*-15000000 , 500.0, osg::Vec4d(1.0, 1.0, 0.0, 1 ), sceneRoot); 87 //util::AddCylinderBetweenPoints(osg::Vec3d(0,0,0), direction*-15000000 , 500.0, osg::Vec4d(0.0, 1.0, 1.0, 1 ), sceneRoot); 88 83 89 84 90 light->setAmbient(ambient); 85 91 light->setDiffuse(diffuse); 86 //light->setSpecular(osg::Vec4(0,0,0,1));92 light->setSpecular(osg::Vec4(0,0,0,1)); 87 93 //light->setSpecular(osg::Vec4(1.0,1.0,1.0,1)); // Test 88 94 light->setPosition(osg::Vec4(direction.x(), direction.y(), direction.z(), 0)); -
osgVisual/trunk/src/util/visual_util.cpp
r293 r295 571 571 } 572 572 573 void util::AddCylinderBetweenPoints(osg::Vec3d StartPoint, osg::Vec3d EndPoint, float radius, float length,osg::Vec4d CylinderColor, osg::Group *pAddToThisGroup)573 void util::AddCylinderBetweenPoints(osg::Vec3d StartPoint, osg::Vec3d EndPoint, float radius, osg::Vec4d CylinderColor, osg::Group *pAddToThisGroup) 574 574 { 575 575 osg::ref_ptr<osg::Geode> geode = new osg::Geode; … … 580 580 osg::ref_ptr<osg::Material> pMaterial; 581 581 582 //height = (StartPoint-EndPoint).length(); 583 height = length; 582 height = (StartPoint-EndPoint).length(); 584 583 center = osg::Vec3( (StartPoint.x() + EndPoint.x()) / 2, (StartPoint.y() + EndPoint.y()) / 2, (StartPoint.z() + EndPoint.z()) / 2); 585 584
Note: See TracChangeset
for help on using the changeset viewer.