Changeset 295 for osgVisual


Ignore:
Timestamp:
Jun 6, 2011, 11:16:54 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
osgVisual/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/trunk/bin/osgVisualConfig.xml

    r293 r295  
    3737      <trackmodel id="2" updater_slot="TRACKING_ID"></trackmodel>
    3838    </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>
    4040    <visibility range="50000" turbidity="2.2" ></visibility>
    4141    <clouds>
  • osgVisual/trunk/include/util/visual_util.h

    r293 r295  
    305305         * @param pAddToThisGroup
    306306         */
    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);
    308308
    309309        template<class T>
  • osgVisual/trunk/src/sky_Silverlining/skySilverLining_skyDrawable.cpp

    r293 r295  
    6767        atmosphere->GetAmbientColor(&ra, &ga, &ba);
    6868        atmosphere->GetSunOrMoonColor(&rd, &gd, &bd);
    69         atmosphere->GetSunOrMoonPosition(&x, &y, &z);
     69        //atmosphere->GetSunOrMoonPosition(&x, &y, &z);
     70                atmosphere->GetSunOrMoonPositionGeographic(&x, &y, &z);
     71               
    7072
    7173        direction = osg::Vec3(x, y, z);
     
    7981        direction.normalize();
    8082               
    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
    8389
    8490        light->setAmbient(ambient);
    8591        light->setDiffuse(diffuse);
    86         //light->setSpecular(osg::Vec4(0,0,0,1));
     92        light->setSpecular(osg::Vec4(0,0,0,1));
    8793                //light->setSpecular(osg::Vec4(1.0,1.0,1.0,1)); // Test
    8894        light->setPosition(osg::Vec4(direction.x(), direction.y(), direction.z(), 0));
  • osgVisual/trunk/src/util/visual_util.cpp

    r293 r295  
    571571}
    572572
    573 void util::AddCylinderBetweenPoints(osg::Vec3d StartPoint, osg::Vec3d EndPoint, float radius, float length, osg::Vec4d CylinderColor, osg::Group *pAddToThisGroup)
     573void util::AddCylinderBetweenPoints(osg::Vec3d StartPoint, osg::Vec3d EndPoint, float radius, osg::Vec4d CylinderColor, osg::Group *pAddToThisGroup)
    574574{
    575575        osg::ref_ptr<osg::Geode> geode = new osg::Geode;
     
    580580        osg::ref_ptr<osg::Material> pMaterial;
    581581
    582         //height = (StartPoint-EndPoint).length();
    583         height  = length;
     582        height = (StartPoint-EndPoint).length();
    584583        center = osg::Vec3( (StartPoint.x() + EndPoint.x()) / 2, (StartPoint.y() + EndPoint.y()) / 2, (StartPoint.z() + EndPoint.z()) / 2);
    585584
Note: See TracChangeset for help on using the changeset viewer.