Ignore:
Timestamp:
01/31/07 18:11:51 (17 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells.env

    r2066 r2069  
    1212 
    1313Preprocessor { 
    14 samplesPerPass 3000000 
     14samplesPerPass 6000000 
    1515        useGlRenderer false 
    1616        type vss 
     
    1919        loadMeshes false 
    2020        # internal raycaster 
    21         rayCastMethod 0 
     21        #rayCastMethod 0 
    2222        # intel raycaster 
    23         #rayCastMethod 1 
     23        rayCastMethod 1 
    2424        exportVisibility false 
    2525        loadKdTree false 
     
    159159                samples 20000 
    160160                exportRays true 
    161                 exportGeometry true 
     161                exportGeometry false 
    162162                exportMergedViewCells false 
    163163                useClipPlane true 
     
    167167        } 
    168168 
    169         #showVisualization true 
    170         showVisualization false 
     169        showVisualization true 
     170        #showVisualization false 
    171171        evaluateViewCells false 
    172172         
     
    190190VspBspTree { 
    191191        Construction { 
    192                 samples 2000000 
     192                samples 900000 
    193193                epsilon 0.0000001 
    194194                randomize false 
     
    238238                minGlobalCostRatio      0.0001 
    239239 
    240                 maxViewCells            5000 
     240                maxViewCells            6000 
    241241         
    242242                # used for pvs criterium 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r2060 r2069  
    12371237                                 "render_sampler_use_occlusion_queries=", 
    12381238                                 "true"); 
    1239  
    1240 //    RegisterOption("VssPreprocessor.initialSamples", 
    1241 //                               optInt, 
    1242 //                               "vss_initial_samples=", 
    1243 //                               "100000"); 
    12441239   
    12451240  RegisterOption("VssPreprocessor.testBeamSampling",  
     
    12471242                                "vss_beam_sampling=",  
    12481243                                "false"); 
    1249  
    1250 //   RegisterOption("VssPreprocessor.vssSamples", 
    1251 //                               optInt, 
    1252 //                               "vss_samples=", 
    1253 //                               "1000000"); 
    1254          
    1255 //   RegisterOption("VssPreprocessor.vssSamplesPerPass", 
    1256 //                               optInt, 
    1257 //                               "vss_samples_per_pass=", 
    1258 //                               "1000"); 
    1259    
    1260 //   RegisterOption("VssPreprocessor.samplesPerPass", 
    1261 //                               optInt, 
    1262 //                               "vss_samples_per_pass=", 
    1263 //                               "100000"); 
    12641244 
    12651245  RegisterOption("VssPreprocessor.useImportanceSampling", 
  • GTP/trunk/Lib/Vis/Preprocessing/src/IntersectableWrapper.h

    r2066 r2069  
    1 #ifndef __KDINTERSECTABLE_H 
    2 #define __KDINTERSECTABLE_H 
     1#ifndef __INTERSECTABLEWRAPPER_H 
     2#define __INTERSECTABLEWRAPPER_H 
    33 
    44#include "AxisAlignedBox3.h" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r2066 r2069  
    12211221{ 
    12221222 
    1223   const long t1 = GetTime(); 
    1224   if (rays.size() > 10000) { 
    1225         mRayCaster->SortRays(rays); 
    1226         cout<<"Rays sorted in "<<TimeDiff(t1, GetTime())<<" ms."<<endl; 
    1227          
    1228         if (0) { 
    1229           VssRayContainer tmpRays; 
    1230           int m = 50000; 
    1231           for (int i=m; i < m+20; i++) { 
    1232                 tmpRays.push_back(new VssRay(rays[i].mOrigin, 
    1233                                                                          rays[i].mOrigin + 100.0f*rays[i].mDirection, 
    1234                                                                          NULL, 
    1235                                                                          NULL 
    1236                                                                          ) 
    1237                                                   ); 
    1238                  
    1239           } 
    1240           ExportRays("sorted_rays.x3d", tmpRays, 200); 
    1241         } 
    1242   } 
    1243    
    1244   SimpleRayContainer::const_iterator rit, rit_end = rays.end(); 
     1223        const long t1 = GetTime(); 
     1224         
     1225        if ((int)rays.size() > 10000) { 
     1226         
     1227                //mRayCaster->SortRays(rays); 
     1228                cout<<"Rays sorted in "<<TimeDiff(t1, GetTime())<<" ms."<<endl; 
     1229 
     1230                if (0) { 
     1231                        VssRayContainer tmpRays; 
     1232                        int m = 890000; 
     1233 
     1234                        for (int i=m; i < m+20; i++) { 
     1235                                tmpRays.push_back(new VssRay(rays[i].mOrigin, 
     1236                                        rays[i].mOrigin + 100.0f*rays[i].mDirection, 
     1237                                        NULL, 
     1238                                        NULL 
     1239                                        ) 
     1240                                        ); 
     1241 
     1242                        } 
     1243                        ExportRays("sorted_rays.x3d", tmpRays, 200); 
     1244                } 
     1245        } 
     1246 
     1247        SimpleRayContainer::const_iterator rit, rit_end = rays.end(); 
    12451248 
    12461249        SimpleRayContainer rayBucket; 
     
    12981301                                                        pruneInvalidRays); 
    12991302                 
     1303        } 
     1304 
     1305        cout << "here5 " << vssRays.size()<<endl; 
     1306 
     1307        if (1) { 
     1308          VssRayContainer tmpRays; 
     1309          int m = 700000; 
     1310           
     1311          for (int i=m; i < m+20; i++) { 
     1312                  if (vssRays[i]) 
     1313                tmpRays.push_back(vssRays[i]);           
     1314          } 
     1315          ExportRays("sorted_rays2.x3d", tmpRays, 200); 
    13001316        } 
    13011317 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj

    r2066 r2069  
    7777                                DisableLanguageExtensions="FALSE" 
    7878                                ForceConformanceInForLoopScope="FALSE" 
    79                                 RuntimeTypeInfo="TRUE" 
     79                                RuntimeTypeInfo="FALSE" 
    8080                                UsePrecompiledHeader="0" 
    8181                                BrowseInformation="1" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.h

    r2063 r2069  
    8282          if (mRays) 
    8383                delete mRays; 
     84          cout << "here4" << endl; 
    8485          mRays = new VssRay[number]; 
    8586          mNumber = number; 
     
    9394                if (mIndex == mNumber) 
    9495                        mIndex = 0; 
    95           return mRays + mIndex++; 
     96          return mRays + mIndex ++; 
    9697        } 
    9798 
     
    121122         
    122123  struct Intersection 
    123         { 
    124                 Intersection(): mObject(NULL), mFaceId(0) 
    125                 {} 
     124  { 
     125          Intersection(): mObject(NULL), mFaceId(0) 
     126          {} 
    126127 
    127                 Intersection(const Vector3 &p, const Vector3 &n, Intersectable *o, const int f): 
    128                         mPoint(p), mNormal(n), mObject(o), mFaceId(f) 
    129                 {} 
     128          Intersection(const Vector3 &p, const Vector3 &n, Intersectable *o, const int f): 
     129          mPoint(p), mNormal(n), mObject(o), mFaceId(f) 
     130          {} 
    130131 
    131                 Intersection(const Vector3 &p): mPoint(p), mObject(NULL), mFaceId(0) 
    132                 {} 
    133                 Vector3 mPoint; 
    134                 Vector3 mNormal; 
    135                 Intersectable *mObject; 
    136                 int mFaceId; 
    137         }; 
     132          Intersection(const Vector3 &p): mPoint(p), mObject(NULL), mFaceId(0) 
     133          {} 
     134          Vector3 mPoint; 
     135          Vector3 mNormal; 
     136          Intersectable *mObject; 
     137          int mFaceId; 
     138  }; 
    138139 
    139140 
    140         int ProcessRay(const SimpleRay &ray, 
    141                                    Intersection &hitA, 
    142                                    Intersection &hitB, 
    143                                    VssRayContainer &vssRays, 
    144                                    const AxisAlignedBox3 &box, 
    145                                    const bool castDoubleRay, 
    146                                    const bool pruneInvalidRays = true); 
     141  int ProcessRay(const SimpleRay &ray, 
     142          Intersection &hitA, 
     143          Intersection &hitB, 
     144          VssRayContainer &vssRays, 
     145          const AxisAlignedBox3 &box, 
     146          const bool castDoubleRay, 
     147          const bool pruneInvalidRays = true); 
    147148 
    148         /** Checks if ray is valid. 
    149                 I.e., the ray is in valid view space. 
    150                 @note: clamps the ray to valid view space. 
    151         */ 
    152         bool ValidateRay(const Vector3 &origin, 
    153                                         const Vector3 &direction, 
    154                                 const AxisAlignedBox3 &box, 
    155                                         Intersection &hit); 
     149  /** Checks if ray is valid. 
     150  I.e., the ray is in valid view space. 
     151  @note: clamps the ray to valid view space. 
     152  */ 
     153  bool ValidateRay(const Vector3 &origin, 
     154          const Vector3 &direction, 
     155          const AxisAlignedBox3 &box, 
     156          Intersection &hit); 
    156157 
    157         bool 
    158                 ClipToViewSpaceBox(const Vector3 &origin, 
    159                                                    const Vector3 &termination, 
    160                                                    Vector3 &clippedOrigin, 
    161                                                    Vector3 &clippedTermination); 
    162          
     158  bool 
     159          ClipToViewSpaceBox(const Vector3 &origin, 
     160          const Vector3 &termination, 
     161          Vector3 &clippedOrigin, 
     162          Vector3 &clippedTermination); 
    163163 
    164164 
    165165 
    166    
     166 
     167 
    167168 
    168169  const Preprocessor &mPreprocessor; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp

    r2066 r2069  
    88#include "Mutation.h" 
    99#include "PerfTimer.h" 
     10 
    1011 
    1112namespace GtpVisibilityPreprocessor { 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2066 r2069  
    38443844        Exporter *exporter; 
    38453845 
    3846 #if 0 
    3847         // export merged view cells 
    3848         mColorCode = 0; // use random colors 
    3849  
    3850         exporter = Exporter::GetExporter("merged_view_cells.wrl"); 
    3851  
    3852         cout << "exporting view cells after merge ... "; 
    3853  
    3854         if (exporter) 
    3855         { 
    3856                 if (mExportGeometry) 
    3857                 { 
    3858                         exporter->ExportGeometry(objects); 
    3859                 } 
    3860  
    3861                 exporter->SetFilled(); 
    3862                 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 
    3863  
    3864                 delete exporter; 
    3865         } 
    3866         cout << "finished" << endl; 
    3867 #endif 
    3868  
    38693846        // export merged view cells using pvs color coding 
    38703847        exporter = Exporter::GetExporter("merged_view_cells_pvs.wrl"); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r2066 r2069  
    679679                if (r == mRoot) 
    680680                { 
    681                         Debug << "VSP BSP tree construction time spent at root: " 
    682                                   << TimeDiff(startTime, GetTime())*1e-3 << "s" << endl; 
     681                        cout << "VSP BSP tree construction time spent at root: " 
     682                                 << TimeDiff(startTime, GetTime())*1e-3 << "s" << endl; 
    683683                } 
    684684 
Note: See TracChangeset for help on using the changeset viewer.