Changeset 130


Ignore:
Timestamp:
Oct 11, 2010, 10:40:38 AM (14 years ago)
Author:
Torben Dannhauer
Message:

Upgraded to Silverlining 2.0

Todo:
Re-enable DEBUg build
correct cloud altitude errors
enable the new ray casting cloud type

Location:
osgVisual
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/bin/visual_master.bat

    r123 r130  
    1 osgVisual.exe -C center -m --window 950 50 600 350 J:\BRD1m_MUC0.25m_srtmEU_BM\terrain.ive -p salzburg.path
     1osgVisual.exe -C center -m --window 950 50 600 350 D:/OpenSceneGraph/VPB-Testdatensatz/DB_Small/database.ive -p salzburg.path
  • osgVisual/include/sky_Silverlining/skySilverLining_ProjectionMatrixCallback.h

    r112 r130  
    149149
    150150                // Retrieve all atmosphere objects.
    151         std::vector<SilverLining::ObjectHandle> &objects = atmosphere->GetObjects();
     151        //std::vector<SilverLining::ObjectHandle> &objects = atmosphere->GetObjects();  //todo
     152                SL_VECTOR(SilverLining::ObjectHandle) &objects = atmosphere->GetObjects();
    152153                int size = objects.size();
    153154               
     
    180181
    181182                // Walk through all objects and check if they influence the near plane or far plane
    182         std::vector<SilverLining::ObjectHandle>::iterator it;
     183        //std::vector<SilverLining::ObjectHandle>::iterator it; // todo
     184        //for (it = objects.begin(); it != objects.end(); it++) // todo
     185                SL_VECTOR(SilverLining::ObjectHandle)::iterator it;
    183186        for (it = objects.begin(); it != objects.end(); it++)
    184187        {
  • osgVisual/src/core/visual_core.cpp

    r129 r130  
    408408void visual_core::setupScenery()
    409409{
    410         // iterate manually through one frame to allow some modules like Sky_Silverlining to initialize properly befor we configure it according to the scenery data.
     410        // iterate manually through one frame to allow some modules like Sky_Silverlining to initialize properly before we configure it according to the scenery data.
    411411        viewer->advance();
    412412        viewer->eventTraversal();
     
    419419        //addWindVolume( 0.0, 15000.0, 300.0, 90.0 );
    420420       
    421         sky->addCloudLayer( 0, 300000, 300000, 600.0, 2351.0, 0.5, STRATUS );
    422         //sky->addCloudLayer( 0, 5000000, 5000000, 600.0, 7351.0, 0.2, CIRRUS_FIBRATUS );
    423         //sky->addCloudLayer( 0, 50000, 50000, 600.0, 7351.0, 0.2, CIRROCUMULUS );
    424         ///sky->addCloudLayer( 1, 200000, 200000, 3000, 2000.0, 0.05, CUMULUS_CONGESTUS );
     421        //sky->addCloudLayer( 0, 20000, 20000, 600.0, 0.0, 0.5, CUMULONIMBUS_CAPPILATUS );
     422        //sky->addCloudLayer( 1, 5000000, 5000000, 600.0, 7351.0, 0.2, CIRRUS_FIBRATUS );
     423        sky->addCloudLayer( 2, 50000, 50000, 600.0, 7351.0, 0.2, CIRROCUMULUS );
     424        sky->addCloudLayer( 3, 100000, 100000, 1300.0, 100.0, 0.07, CUMULUS_CONGESTUS );
     425        sky->addCloudLayer( 0, 10000, 10000, 1300.0, 4000.0, 0.90, STRATOCUMULUS );
    425426        //cloudLayerSlots[1].cloudLayerPointer->SetPrecipitation(SilverLining::CloudLayer::SLEET, 25.0 );
    426427
  • osgVisual/src/sky_Silverlining/visual_skySilverLining.cpp

    r122 r130  
    361361                {
    362362                        // go through all wind volumes an check them for inside()
    363                         std::map<int, SilverLining::WindVolume> windvolumes = atmosphere->GetConditions()->GetWindVolumes();
     363                        //std::map<int, SilverLining::WindVolume> windvolumes = atmosphere->GetConditions()->GetWindVolumes();
     364                        SL_MAP(int, SilverLining::WindVolume) windvolumes = atmosphere->GetConditions()->GetWindVolumes();
    364365                        for(unsigned int i=0; i<windvolumes.size(); i++)
    365366                        {
     
    435436                if ( util::calculateEarthRadiusAtWGS84Coordinate(lat, lon, sceneRoot, radius) )
    436437                {
     438                        OSG_NOTIFY(osg::ALWAYS) << "radius:" << radius << std::endl;
    437439                        // generate Cloud Layer
    438440                        SilverLining::CloudLayer *cloudLayer_;
    439441                        cloudLayer_ = SilverLining::CloudLayerFactory::Create(cloudtype_);
    440                         cloudLayer_->SetBaseAltitude( baseHeight_ + radius);
    441                        
     442                        cloudLayer_->SetBaseAltitude( baseHeight_ + radius); // todo
     443                        //cloudLayer_->SetBaseAltitude( radius - 10000); // todo
     444                                               
    442445                        cloudLayer_->SetThickness(thickness_);
    443446                        cloudLayer_->SetBaseLength(baseLength_);
     
    457460                        case 1: cloudLayerSlots[slot_].typeName = "CIRRUS_FIBRATUS";                    // High, thicker and fibrous clouds that signal changing weather
    458461                        break;
    459                         case 2: cloudLayerSlots[slot_].typeName = "NIMBOSTRATUS";               // Low rain clouds that cover the sky
     462                        case 2: cloudLayerSlots[slot_].typeName = "STRATUS";                                    // Low clouds represented as a slab
    460463                        break;
    461464                        case 3: cloudLayerSlots[slot_].typeName = "CUMULUS_MEDIOCRIS";          // Low, puffy clouds on fair days
     
    465468                        case 5: cloudLayerSlots[slot_].typeName = "CUMULONIMBUS_CAPPILATUS";    // Big storm clouds.
    466469                        break;
    467                         case 6: cloudLayerSlots[slot_].typeName = "CUMULUS_CONGESTUS_INFINITE"; // Cumulus congestus layer that wraps to surround the camera at all times.
    468                         break;
    469                         case 7: cloudLayerSlots[slot_].typeName = "CUMULUS_MEDIOCRIS_INFINITE"; // Cumulus mediocris layer that wraps to surround the camera at all times.
     470                        case 6: cloudLayerSlots[slot_].typeName = "STRATOCUMULUS";                              // Low, dense, puffy clouds with some sun breaks between them.
    470471                                break;
    471472                        default: OSG_NOTIFY( osg::FATAL ) << "visual_skySilverlining::addCloudLayer - Invalid cloud type." << std::cout;
     
    617618                                {
    618619                                        hasPrecipitation = true;
    619                                         std::map<int, double> precipitationMap = cloudLayerSlots[i].cloudLayerPointer->GetPrecipitation();
    620                                         for( std::map<int, double>::iterator it = precipitationMap.begin(); it != precipitationMap.end(); it++ )
     620                                        SL_MAP (int, double) precipitationMap = cloudLayerSlots[i].cloudLayerPointer->GetPrecipitation();
     621                                        for( SL_MAP (int, double)::iterator it = precipitationMap.begin(); it != precipitationMap.end(); it++ )
    621622                                        {
    622623                                                switch(it->first)
     
    673674                        if( cloudLayerSlots[slot_].cloudLayerPointer->HasPrecipitationAtPosition(x, y, z) )
    674675                        {
    675                                 std::map<int, double> precipitationMap = cloudLayerSlots[slot_].cloudLayerPointer->GetPrecipitation();
    676                                 for( std::map<int, double>::iterator it = precipitationMap.begin(); it != precipitationMap.end(); it++ )
     676                                SL_MAP (int, double) precipitationMap = cloudLayerSlots[slot_].cloudLayerPointer->GetPrecipitation();
     677                                for( SL_MAP (int, double)::iterator it = precipitationMap.begin(); it != precipitationMap.end(); it++ )
    677678                                {
    678679                                        switch(it->first)
     
    715716                        // Check for precipitation
    716717
    717                                 std::map<int, double> precipitationMap = cloudLayerSlots[slot_].cloudLayerPointer->GetPrecipitation();
    718                                 for( std::map<int, double>::iterator it = precipitationMap.begin(); it != precipitationMap.end(); it++ )
     718                                SL_MAP (int, double) precipitationMap = cloudLayerSlots[slot_].cloudLayerPointer->GetPrecipitation();
     719                                for( SL_MAP (int, double)::iterator it = precipitationMap.begin(); it != precipitationMap.end(); it++ )
    719720                                {
    720721                                        switch(it->first)
  • osgVisual/src/util/visual_util.cpp

    r31 r130  
    206206        else
    207207        {
    208                 OSG_NOTIFY( osg::FATAL ) << "util::calculateEarthRadiusAtWGS84Coordinate() :: Unablöe to calculate Earth Radius!" << std::endl;
     208                OSG_NOTIFY( osg::FATAL ) << "util::calculateEarthRadiusAtWGS84Coordinate() :: Unable to calculate Earth Radius!" << std::endl;
    209209                return false;
    210210        }
Note: See TracChangeset for help on using the changeset viewer.