Changeset 292 for osgVisual


Ignore:
Timestamp:
Jun 5, 2011, 6:44:54 PM (14 years ago)
Author:
Torben Dannhauer
Message:

Better Near&Far plane calculation to allow views from deeper space.

Location:
osgVisual/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/trunk/include/sky_Silverlining/skySilverLining_ProjectionMatrixCallback.h

    r221 r292  
    6767                keys->push_back(osgAnimation::Vec2Keyframe(      0.0, osg::Vec2(     1.0,     80000.0)));
    6868                keys->push_back(osgAnimation::Vec2Keyframe(     50.0, osg::Vec2(     5.0,     90000.0)));
    69         //keys->push_back(osgAnimation::Vec2Keyframe(    500.0, osg::Vec2(     5.0,    100000.0)));
    70         //keys->push_back(osgAnimation::Vec2Keyframe(   1000.0, osg::Vec2(    10.0,    100000.0)));
     69                keys->push_back(osgAnimation::Vec2Keyframe(    500.0, osg::Vec2(     5.0,    100000.0)));
     70                keys->push_back(osgAnimation::Vec2Keyframe(   1000.0, osg::Vec2(    10.0,    100000.0)));
    7171        //keys->push_back(osgAnimation::Vec2Keyframe(  10000.0, osg::Vec2(   100.0,   1000000.0)));
    7272        //keys->push_back(osgAnimation::Vec2Keyframe(1000000.0, osg::Vec2(100000.0, 200000000.0)));
    73                 keys->push_back(osgAnimation::Vec2Keyframe(    500.0, osg::Vec2(     5.0,    100000.0)));
    74                 keys->push_back(osgAnimation::Vec2Keyframe(   1000.0, osg::Vec2(    10.0,    100000.0)));
    75                 keys->push_back(osgAnimation::Vec2Keyframe(  10000.0, osg::Vec2(   50.0,   1000000.0)));
    76                 keys->push_back(osgAnimation::Vec2Keyframe(1000000.0, osg::Vec2(100.0, 200000000.0)));
     73                keys->push_back(osgAnimation::Vec2Keyframe(   10000.0, osg::Vec2(   50.0,   1000000.0)));
     74                keys->push_back(osgAnimation::Vec2Keyframe( 1000000.0, osg::Vec2(  100.0, 200000000.0)));
     75                keys->push_back(osgAnimation::Vec2Keyframe( 2000000.0, osg::Vec2(  250.0, 200000000.0)));
     76                keys->push_back(osgAnimation::Vec2Keyframe( 3000000.0, osg::Vec2(  500.0, 200000000.0)));
     77                keys->push_back(osgAnimation::Vec2Keyframe( 4000000.0, osg::Vec2( 1000.0, 200000000.0)));
     78                keys->push_back(osgAnimation::Vec2Keyframe( 5000000.0, osg::Vec2(10000.0, 200000000.0)));
     79                keys->push_back(osgAnimation::Vec2Keyframe( 6000000.0, osg::Vec2(  10000.0, 200000000.0)));
     80                keys->push_back(osgAnimation::Vec2Keyframe( 7000000.0, osg::Vec2( 100000.0, 200000000.0)));
     81                keys->push_back(osgAnimation::Vec2Keyframe( 8000000.0, osg::Vec2(1000000.0, 200000000.0)));
     82                keys->push_back(osgAnimation::Vec2Keyframe( 9000000.0, osg::Vec2(1250000.0, 200000000.0)));
     83                keys->push_back(osgAnimation::Vec2Keyframe(10000000.0, osg::Vec2(2500000.0, 200000000.0)));
     84                keys->push_back(osgAnimation::Vec2Keyframe(11000000.0, osg::Vec2(5000000.0, 200000000.0)));
     85                keys->push_back(osgAnimation::Vec2Keyframe(12000000.0, osg::Vec2(7500000.0, 200000000.0)));
     86                keys->push_back(osgAnimation::Vec2Keyframe(50000000.0, osg::Vec2(15000000.0,2000000000.0)));
    7787
    7888    }
  • osgVisual/trunk/src/sky_Silverlining/skySilverLining_skyDrawable.cpp

    r281 r292  
    7070
    7171        direction = osg::Vec3(x, y, z);
    72         ambient = osg::Vec4(ra, ga, ba, 1.0);
     72                ambient = osg::Vec4(ra, ga, ba, 1.0);
     73        //ambient = osg::Vec4(ra*0.1, ga*0.1, ba*0.1, 1.0);     // For use with shadow
    7374        diffuse = osg::Vec4(rd, gd, bd, 1.0);
    7475
    7576        // xform the light direction into camera coordinates
    76         osg::Quat view = _view->getCamera()->getViewMatrix().getRotate();
     77        //osg::Quat view = _view->getCamera()->getViewMatrix().getRotate();
    7778        //direction = view * direction;
    7879        direction.normalize();
     
    8081        light->setAmbient(ambient);
    8182        light->setDiffuse(diffuse);
    82         light->setSpecular(osg::Vec4(0,0,0,1));
     83        //light->setSpecular(osg::Vec4(0,0,0,1));
     84                light->setSpecular(osg::Vec4(1.0,1.0,1.0,1));   // Test
    8385        light->setPosition(osg::Vec4(direction.x(), direction.y(), direction.z(), 0));
    8486    }
Note: See TracChangeset for help on using the changeset viewer.