Changeset 137 for osgVisual/src/sky_Silverlining
- Timestamp:
- Oct 18, 2010, 6:48:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/src/sky_Silverlining/visual_skySilverLining.cpp
r136 r137 251 251 void visual_skySilverLining::updateUpVector() 252 252 { 253 //// Allowed deltaLat and deltaLon between Updating the upvector254 //double deltaLatToUpdate = osg::DegreesToRadians( 0.1 ); // 0.5 deg255 //double deltaLonToUpdate = osg::DegreesToRadians( 0.1 ); // 0.5 deg256 257 //if ( fabs(lat-upVectorLat) > deltaLatToUpdate || fabs(lon-upVectorLon) > deltaLonToUpdate )258 //{259 // // Get ellipsoid model260 // osg::EllipsoidModel* ellipsoid = sceneRoot->getEllipsoidModel();261 // if ( !ellipsoid )262 // return;263 264 // //OSG_NOTIFY( osg::ALWAYS ) << "update Upvector.." << std::endl;265 266 // // Calculate up vector267 // double x,y,z;268 // util::getXYZofCamera(sceneCamera, x, y, z);269 // osg::Vec3d upVector = ellipsoid->computeLocalUpVector( x, y, z );270 // upVector.normalize();271 //272 // // Calculate side vector273 // osg::Matrixd localToWorld;274 // ellipsoid->computeLocalToWorldTransformFromLatLongHeight(lat, lon, height, localToWorld);275 276 // osg::Vec3d sideVector(localToWorld(0, 0), localToWorld(0, 1), localToWorld(0, 2));277 // sideVector.normalize();278 279 // // Update silverlining vectors280 // //std::cout << "upVector: X: " << upVector.x() << ", Y: "<< upVector.y() << ", Z: "<< upVector.z() << std::endl;281 // //std::cout << "sideVector: X: " << sideVector.x() << ", Y: "<< sideVector.y() << ", Z: "<< sideVector.z() << std::endl;282 // atmosphere->SetUpVector( upVector.x(), upVector.y(), upVector.z() );283 // atmosphere->SetRightVector( sideVector.x(), sideVector.y(), sideVector.z() );284 285 // // Note new upvector lat/lon286 // upVectorLon = lon;287 // upVectorLat = lat;288 //} // If update requiered END289 290 253 double x,y,z; 291 254 util::getXYZofCamera(sceneCamera, x, y, z); … … 316 279 } 317 280 } 318 319 atmosphere->SetProjectionMatrix(dProj);281 //atmosphere->SetCameraMatrix(dView); 282 //atmosphere->SetProjectionMatrix(dProj); 320 283 } 321 284
Note: See TracChangeset
for help on using the changeset viewer.