Changeset 2069 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 01/31/07 18:11:51 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r2060 r2069 1237 1237 "render_sampler_use_occlusion_queries=", 1238 1238 "true"); 1239 1240 // RegisterOption("VssPreprocessor.initialSamples",1241 // optInt,1242 // "vss_initial_samples=",1243 // "100000");1244 1239 1245 1240 RegisterOption("VssPreprocessor.testBeamSampling", … … 1247 1242 "vss_beam_sampling=", 1248 1243 "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");1264 1244 1265 1245 RegisterOption("VssPreprocessor.useImportanceSampling", -
GTP/trunk/Lib/Vis/Preprocessing/src/IntersectableWrapper.h
r2066 r2069 1 #ifndef __ KDINTERSECTABLE_H2 #define __ KDINTERSECTABLE_H1 #ifndef __INTERSECTABLEWRAPPER_H 2 #define __INTERSECTABLEWRAPPER_H 3 3 4 4 #include "AxisAlignedBox3.h" -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r2066 r2069 1221 1221 { 1222 1222 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(); 1245 1248 1246 1249 SimpleRayContainer rayBucket; … … 1298 1301 pruneInvalidRays); 1299 1302 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); 1300 1316 } 1301 1317 -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj
r2066 r2069 77 77 DisableLanguageExtensions="FALSE" 78 78 ForceConformanceInForLoopScope="FALSE" 79 RuntimeTypeInfo=" TRUE"79 RuntimeTypeInfo="FALSE" 80 80 UsePrecompiledHeader="0" 81 81 BrowseInformation="1" -
GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.h
r2063 r2069 82 82 if (mRays) 83 83 delete mRays; 84 cout << "here4" << endl; 84 85 mRays = new VssRay[number]; 85 86 mNumber = number; … … 93 94 if (mIndex == mNumber) 94 95 mIndex = 0; 95 return mRays + mIndex ++;96 return mRays + mIndex ++; 96 97 } 97 98 … … 121 122 122 123 struct Intersection 123 124 125 124 { 125 Intersection(): mObject(NULL), mFaceId(0) 126 {} 126 127 127 128 129 128 Intersection(const Vector3 &p, const Vector3 &n, Intersectable *o, const int f): 129 mPoint(p), mNormal(n), mObject(o), mFaceId(f) 130 {} 130 131 131 132 133 134 135 136 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 }; 138 139 139 140 140 141 142 143 144 145 146 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); 147 148 148 149 150 151 152 153 154 155 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); 156 157 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); 163 163 164 164 165 165 166 166 167 167 168 168 169 const Preprocessor &mPreprocessor; -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp
r2066 r2069 8 8 #include "Mutation.h" 9 9 #include "PerfTimer.h" 10 10 11 11 12 namespace GtpVisibilityPreprocessor { -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2066 r2069 3844 3844 Exporter *exporter; 3845 3845 3846 #if 03847 // export merged view cells3848 mColorCode = 0; // use random colors3849 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 #endif3868 3869 3846 // export merged view cells using pvs color coding 3870 3847 exporter = Exporter::GetExporter("merged_view_cells_pvs.wrl"); -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r2066 r2069 679 679 if (r == mRoot) 680 680 { 681 Debug<< "VSP BSP tree construction time spent at root: "682 681 cout << "VSP BSP tree construction time spent at root: " 682 << TimeDiff(startTime, GetTime())*1e-3 << "s" << endl; 683 683 } 684 684
Note: See TracChangeset
for help on using the changeset viewer.