Changeset 2021


Ignore:
Timestamp:
01/23/07 01:06:46 (17 years ago)
Author:
bittner
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/CombinedPreprocessor.cpp

    r2015 r2021  
    8787         
    8888        mMixtureDistribution->GenerateSamples(mSamplesPerPass, rays); 
    89  
     89         
    9090        bool doubleRays = true; 
    9191        CastRays(rays, vssRays, doubleRays, pruneInvalidRays); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Makefile

    r2019 r2021  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.2) on: po 22. I 22:05:05 2007 
     3# Generated by qmake (2.00a) (Qt 4.1.2) on: út 23. I 00:22:45 2007 
    44# Project:  preprocessor.pro 
    55# Template: app 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp

    r2011 r2021  
    9090                mutationRays++; 
    9191                 
    92                 Intersectable *newObject = 
    93                   mPreprocessor.mViewCellsManager->GetIntersectable( 
    94                                                                                                                         *vssRays[i], 
    95                                                                                                                         true); 
    96  
    97                 Intersectable *oldObject = 
    98                   mPreprocessor.mViewCellsManager->GetIntersectable( 
    99                                                                                                                         *mRays[vssRays[i]->mGeneratorId].mRay, 
    100                                                                                                                         true); 
     92                Intersectable *newObject = vssRays[i]->mTerminationObject; 
     93 
     94                Intersectable *oldObject =mRays[vssRays[i]->mGeneratorId].mRay->mTerminationObject; 
    10195                 
    10296                if (oldObject == newObject) 
     
    131125#define DIST_THRESHOLD 3.0f 
    132126 
    133                 Intersectable *oldObject = 
    134                   mPreprocessor.mViewCellsManager->GetIntersectable( 
    135                                                                                                                         *oldRay, 
    136                                                                                                                         true); 
     127                Intersectable *oldObject = oldRay->mTerminationObject; 
    137128                 
    138129 
     
    156147                mutationRays++; 
    157148                 
    158                 Intersectable *newObject = 
    159                   mPreprocessor.mViewCellsManager->GetIntersectable( 
    160                                                                                                                         *vssRays[i], 
    161                                                                                                                         true); 
     149                Intersectable *newObject = vssRays[i]->mTerminationObject; 
    162150 
    163151 
     
    370358  Vector3 line = 2.0f*(oldPivot - newPivot); 
    371359 
    372   Intersectable *occluder = mPreprocessor.mViewCellsManager->GetIntersectable( 
    373                                                                                                                                                           newRay, 
    374                                                                                                                                                           true); 
     360  Intersectable *occluder = newRay.mTerminationObject; 
    375361   
    376362  AxisAlignedBox3 box = occluder->GetBox(); 
     
    442428          exporter->SetFilled(); 
    443429           
    444           Intersectable *occludee = mPreprocessor.mViewCellsManager->GetIntersectable( 
    445                                                                                                                                                                   oldRay, 
    446                                                                                                                                                                   true); 
     430          Intersectable *occludee =  
     431                oldRay.mTerminationObject; 
    447432           
    448433          exporter->SetForcedMaterial(RgbColor(0,0,1)); 
     
    734719  VssRay *ray = mRays[index].mRay; 
    735720 
    736   Intersectable *object = mPreprocessor.mViewCellsManager->GetIntersectable( 
    737                                                                                                                                                         *ray, 
    738                                                                                                                                                         true); 
     721  Intersectable *object = ray->mTerminationObject; 
    739722   
    740723  AxisAlignedBox3 box = object->GetBox(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r2017 r2021  
    13001300#endif 
    13011301        } 
     1302 
     1303        mViewCellsManager->DeterminePvsObjects(vssRays 
     1304                                                                                   ); 
     1305         
    13021306} 
    13031307 
  • GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.cpp

    r2014 r2021  
    312312                Debug<<"PR2c"<<flush; 
    313313#endif 
    314  
     314                 
    315315                if (validA) 
    316                         vssRay->mFlags |= VssRay::Valid; 
    317  
     316                  vssRay->mFlags |= VssRay::Valid; 
     317 
     318                 
    318319                vssRay->mDistribution = simpleRay.mDistribution; 
    319320                vssRay->mGeneratorId = simpleRay.mGeneratorId; 
     
    343344                        vssRay->mFlags |= VssRay::Valid; 
    344345 
     346                   
    345347                vssRay->mDistribution = simpleRay.mDistribution; 
    346348                vssRay->mGeneratorId = simpleRay.mGeneratorId; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2019 r2021  
    26152615 
    26162616 
     2617void 
     2618ViewCellsManager::DeterminePvsObjects( 
     2619                                                                          VssRayContainer &rays, 
     2620                                                                          const bool useHitObjects) 
     2621{ 
     2622  if (!useHitObjects) { 
     2623        VssRayContainer::const_iterator it, it_end = rays.end(); 
     2624        for (it = rays.begin(); it != it_end; ++ it) { 
     2625          VssRay *vssRay = *it; 
     2626          // set only the termination object 
     2627          vssRay->mTerminationObject = GetIntersectable( 
     2628                                                                                                        *vssRay, 
     2629                                                                                                        true); 
     2630        } 
     2631  } 
     2632} 
     2633 
     2634 
    26172635float ViewCellsManager::ComputeSampleContribution(VssRay &ray, 
    26182636                                                                                                  const bool addRays, 
     
    26292647        Intersectable *terminationObj; 
    26302648 
    2631         if (!useHitObjects) 
    2632                 terminationObj = GetIntersectable(ray, true); 
    2633         else 
    2634                 terminationObj = ray.mTerminationObject; 
     2649        terminationObj = ray.mTerminationObject; 
    26352650 
    26362651        ComputeViewCellContribution(currentViewCell,  
     
    27162731        Intersectable *terminationObj; 
    27172732         
    2718         objTimer.Entry(); 
     2733        //      objTimer.Entry(); 
    27192734 
    27202735        // obtain pvs entry (can be different from hit object) 
    2721         if (!useHitObjects) 
    2722           terminationObj = GetIntersectable(ray, true); 
    2723         else 
    2724           terminationObj = ray.mTerminationObject; 
    2725          
    2726         objTimer.Exit(); 
     2736        terminationObj = ray.mTerminationObject; 
     2737         
     2738        //      objTimer.Exit(); 
    27272739         
    27282740        pvsTimer.Entry(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r2017 r2021  
    381381  SortViewCellPvs(); 
    382382 
     383  // map the ray intersection objects from triangles to high level objects... 
     384  void 
     385  DeterminePvsObjects( 
     386                                          VssRayContainer &rays, 
     387                                          const bool useHitObjects = false); 
     388         
    383389        /** Sets validity of view cell 
    384390        */ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r2017 r2021  
    34543454                        BspInterior *in = static_cast<BspInterior *>(node); 
    34553455 
    3456                         Plane3 splitPlane = in->GetPlane(); 
     3456                        Plane3 &splitPlane = in->GetPlane(); 
    34573457                         
    34583458                        const int entSide = splitPlane.Side(entp, thresh); 
     
    35033503                         
    35043504                        // question: always contribute to leaf or to currently active view cell? 
    3505                         if (0) 
    3506                                 viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell()); 
    3507                         else 
    3508                                 viewCell = leaf->GetViewCell(); 
     3505                        //                      if (0) 
     3506                        //                              viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell()); 
     3507                        //                      else 
     3508                        viewCell = leaf->GetViewCell(); 
    35093509 
    35103510                        if (!viewCell->Mailed()) 
  • GTP/trunk/Lib/Vis/Preprocessing/src/run_test2

    r2016 r2021  
    33 
    44#COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 
    5 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000" 
     5COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_pass=1000000" 
    66 
    77#SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d" 
     
    5858$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
    5959-rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 
     60-view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 
    6061-preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4j.xml \ 
    6162-preprocessor_stats=$PREFIX-i-mixed-b1-n4j.log \ 
Note: See TracChangeset for help on using the changeset viewer.