Changeset 137 for osgVisual


Ignore:
Timestamp:
Oct 18, 2010, 6:48:31 PM (14 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/src/sky_Silverlining/visual_skySilverLining.cpp

    r136 r137  
    251251void visual_skySilverLining::updateUpVector()
    252252{
    253         //// Allowed deltaLat and deltaLon between Updating the upvector
    254         //double deltaLatToUpdate = osg::DegreesToRadians( 0.1 );       // 0.5 deg
    255         //double deltaLonToUpdate = osg::DegreesToRadians( 0.1 ); // 0.5 deg
    256 
    257         //if ( fabs(lat-upVectorLat) > deltaLatToUpdate || fabs(lon-upVectorLon) > deltaLonToUpdate )
    258         //{
    259         //      // Get ellipsoid model
    260         //      osg::EllipsoidModel* ellipsoid = sceneRoot->getEllipsoidModel();
    261         //      if ( !ellipsoid )
    262         //              return;
    263 
    264         //      //OSG_NOTIFY( osg::ALWAYS ) << "update Upvector.." << std::endl;
    265 
    266         //      // Calculate up vector
    267         //      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 vector
    273         //      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 vectors
    280         //      //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/lon
    286         //      upVectorLon = lon;
    287         //      upVectorLat = lat;
    288         //}     // If update requiered END
    289 
    290253        double x,y,z;
    291254    util::getXYZofCamera(sceneCamera, x, y, z);
     
    316279        }
    317280    }
    318     atmosphere->SetCameraMatrix(dView);
    319     atmosphere->SetProjectionMatrix(dProj);
     281        //atmosphere->SetCameraMatrix(dView);
     282    //atmosphere->SetProjectionMatrix(dProj);
    320283}
    321284
Note: See TracChangeset for help on using the changeset viewer.