- Timestamp:
- 12/09/05 21:04:33 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/AxisAlignedBox3.h
r448 r459 55 55 } 56 56 57 57 float Size(const int axis) const { 58 58 return Max(axis) - Min(axis); 59 59 } -
trunk/VUT/GtpVisibilityPreprocessor/src/Exporter.h
r448 r459 135 135 GetExporter(const string filename); 136 136 137 virtual void ExportViewpoint(const Vector3 &point, const Vector3 &direction) = 0; 138 137 139 }; 138 140 -
trunk/VUT/GtpVisibilityPreprocessor/src/Makefile
r450 r459 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (1.07a) (Qt 3.3.2) on: Mon Dec 05 09:51:4520053 # Generated by qmake (1.07a) (Qt 3.3.2) on: Mon Dec 05 10:27:34 2005 4 4 # Project: preprocessor.pro 5 5 # Template: app … … 13 13 LEX = flex 14 14 YACC = byacc 15 CFLAGS = -nologo -Zm200 -W0 -MD d -Zi -Gm -GX -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT16 CXXFLAGS = -nologo -Zm200 -W0 -MD d -Zi -Gm -GX -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT15 CFLAGS = -nologo -Zm200 -W0 -MD -O2 -G7 -GX -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -DQT_NO_DEBUG 16 CXXFLAGS = -nologo -Zm200 -W0 -MD -O2 -G7 -GX -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -DQT_NO_DEBUG 17 17 LEXFLAGS = 18 18 YACCFLAGS =-d 19 19 INCPATH = -I"..\src" -I"..\support\xerces\include" -I"..\support\zlib\include" -I"..\support\boost" -I"..\support\devil\include" -I"$(QTDIR)\include" -I"d:\gametools\svn\trunk\VUT\GtpVisibilityPreprocessor\src" -I"C:\Qt\3.3.2\mkspecs\win32-msvc.net" 20 20 LINK = "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe" 21 LFLAGS = /NOLOGO /DE BUG/SUBSYSTEM:CONSOLE /LIBPATH:"../support/xerces/lib" /LIBPATH:"../support/devil/lib" /LIBPATH:"$(QTDIR)\lib"21 LFLAGS = /NOLOGO /DELAYLOAD:comdlg32.dll /DELAYLOAD:oleaut32.dll /DELAYLOAD:winmm.dll /DELAYLOAD:wsock32.dll /DELAYLOAD:winspool.dll /SUBSYSTEM:CONSOLE /LIBPATH:"../support/xerces/lib" /LIBPATH:"../support/devil/lib" /LIBPATH:"$(QTDIR)\lib" 22 22 LIBS = "qt-mt332.lib" "qtmain.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "imm32.lib" "winmm.lib" "wsock32.lib" "winspool.lib" "delayimp.lib" "xerces-c_2.lib" "devil.lib" "ilu.lib" "ilut.lib" "opengl32.lib" "glu32.lib" 23 23 MOC = $(QTDIR)\bin\moc.exe … … 224 224 -$(DEL_FILE) ViewCellsManager.obj 225 225 -$(DEL_FILE) VspBspTree.obj 226 -$(DEL_FILE) preprocessor.pdb227 -$(DEL_FILE) preprocessor.ilk228 -$(DEL_FILE) vc*.pdb229 -$(DEL_FILE) vc*.idb230 231 226 232 227 … … 380 375 VspKdTree.h \ 381 376 VssTree.h \ 377 VspBspTree.h \ 382 378 RssTree.h \ 383 379 Containers.h \ … … 636 632 common.h \ 637 633 Statistics.h \ 634 VssRay.h \ 638 635 639 636 … … 670 667 Containers.h \ 671 668 Statistics.h \ 672 Intersectable.h \673 Matrix4x4.h \674 Mat erial.h \675 Pvs.h \676 Rectangle3.h \677 VssRay.h \669 VssRay.h \ 670 Intersectable.h \ 671 Matrix4x4.h \ 672 Material.h \ 673 Pvs.h \ 674 Rectangle3.h \ 678 675 679 676 … … 743 740 ViewCellBsp.h \ 744 741 ViewCell.h \ 745 common.h \ 746 Statistics.h \ 747 Containers.h \ 748 AxisAlignedBox3.h \ 749 Ray.h \ 750 Pvs.h \ 751 Rectangle3.h \ 752 Matrix4x4.h \ 753 Vector3.h \ 754 Plane3.h \ 755 Mesh.h \ 756 Polygon3.h \ 757 Intersectable.h \ 758 Material.h \ 742 VspBspTree.h \ 743 VspKdTree.h \ 744 common.h \ 745 Statistics.h \ 746 Containers.h \ 747 AxisAlignedBox3.h \ 748 Ray.h \ 749 Pvs.h \ 750 Rectangle3.h \ 751 Matrix4x4.h \ 752 Vector3.h \ 753 Plane3.h \ 754 Mesh.h \ 755 Polygon3.h \ 756 VssRay.h \ 757 Intersectable.h \ 758 Material.h \ 759 RayInfo.h \ 759 760 760 761 … … 815 816 VssRay.h \ 816 817 RssTree.h \ 818 ViewCellBsp.h \ 817 819 Containers.h \ 818 820 AxisAlignedBox3.h \ … … 874 876 AxisAlignedBox3.h \ 875 877 Exporter.h \ 878 ViewCellBsp.h \ 876 879 Vector3.h \ 877 880 Containers.h \ -
trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp
r452 r459 17 17 18 18 static bool exportPvs = false; 19 static int numExportRays = 10000; 20 // static int numExportRays = 0; 19 21 20 22 RssPreprocessor::RssPreprocessor(): … … 215 217 num = rssTree->GenerateRays(p, rays); 216 218 } else { 217 int leaves = rssTree->stat.Leaves()/ 2;219 int leaves = rssTree->stat.Leaves()/1; 218 220 num = rssTree->GenerateRays(desiredSamples, leaves, rays); 219 221 } … … 365 367 exporter->SetFilled(); 366 368 exporter->ExportGeometry(pvs); 369 exporter->SetWireframe(); 370 exporter->ExportBox(rssTree->bbox); 371 exporter->ExportViewpoint(rssTree->bbox.Center(), Vector3(1,0,0)); 367 372 delete exporter; 368 373 } … … 385 390 386 391 if (fromBoxVisibility) { 387 float size = 0.05f; 392 float m = box->Min(1); 393 float bsize = box->Size(1); 394 395 float size = 0.02f; 388 396 float s = 0.5f - size; 389 397 float olds = Magnitude(box->Size()); 390 398 box->Enlarge(box->Size()*Vector3(-s)); 391 Vector3 translation = Vector3(-olds*0.1f, 0, 0); 399 // Vector3 translation = Vector3(-olds*0.2f, 0, 0); 400 Vector3 translation = Vector3(-0.05*olds, 0, 0); 392 401 box->SetMin(box->Min() + translation); 393 402 box->SetMax(box->Max() + translation); 403 404 box->SetMin(1, m + bsize*0.1); 405 box->SetMax(1, m + bsize*0.6); 406 407 394 408 } else { 395 409 396 410 // sample city like heights 397 box->SetMin(1, box->Min(1) + box->Size(1)*0.2); 398 box->SetMax(1, box->Min(1) + box->Size(1)*0.3); 411 float m = box->Min(1); 412 float bsize = box->Size(1); 413 box->SetMin(1, m + bsize*0.2); 414 box->SetMax(1, m + bsize*0.3); 399 415 } 400 416 … … 462 478 cout << "#totalRayStackSize=" << mVssRays.size() << endl <<flush; 463 479 464 int numExportRays = 10000;465 // int numExportRays = 0;466 480 467 481 if (numExportRays) { … … 471 485 } 472 486 473 if (exportPvs) {474 ExportPvs("rss-pvs-initial.x3d", rssTree);475 }476 487 477 488 // construct view cells … … 494 505 495 506 ExportRssTreeLeaves(rssTree, 10); 507 508 if (exportPvs) { 509 ExportPvs("rss-pvs-initial.x3d", rssTree); 510 } 496 511 497 512 // viewcells->UpdatePVS(newVssRays); … … 539 554 int subdivided = rssTree->UpdateSubdivision(); 540 555 cout<<"subdivided leafs = "<<subdivided<<endl; 556 cout<<"#total leaves = "<<rssTree->stat.Leaves()<<endl; 557 541 558 } 542 559 -
trunk/VUT/GtpVisibilityPreprocessor/src/RssTree.cpp
r447 r459 1779 1779 Vector3 o3 = leaf->rays[r3].GetOrigin(); 1780 1780 1781 const float overlap = 0. 1;1781 const float overlap = 0.0; 1782 1782 1783 1783 Vector3 origin, direction; 1784 1784 // generate half of convex combination and half of random rays 1785 bool useExtendedConvexCombination = (i > numberOfRays/2);1785 bool useExtendedConvexCombination = 0 && (i > numberOfRays/2); 1786 1786 if (useExtendedConvexCombination) { 1787 1787 float w1, w2, w3; -
trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.cpp
r446 r459 166 166 w1 = RandomValue(-overlap, 1.0f + overlap); 167 167 w2 = RandomValue(-overlap, 1.0f + overlap); 168 w3 = RandomValue(-overlap, 1.0f + overlap); 169 170 float c = 1.0f/(w1 + w2 + w3); 171 w1 *= c; 172 w2 *= c; 173 w3 *= c; 168 w3 = 1.0f - w1 - w2; 174 169 } -
trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp
r450 r459 1308 1308 return true; 1309 1309 } 1310 1311 1312 void 1313 X3dExporter::ExportViewpoint(const Vector3 &point, 1314 const Vector3 &direction) 1315 { 1316 stream<<"<Viewpoint "<<endl; 1317 1318 stream<<"position=\""<<point.x<<" "<<point.y<<" "<<point.z<<"\""<<endl; 1319 // stream<<"orientation "<<direction.x<<direction.y<<direction.z<<endl; 1320 1321 stream<<">"<<endl; 1322 stream<<"</Viewpoint>"<<endl; 1323 1324 } -
trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.h
r448 r459 143 143 const AxisAlignedBox3 &box, 144 144 const bool exportDepth, 145 146 145 147 const bool epsilon); 148 149 void ExportViewpoint(const Vector3 &point, const Vector3 &direction); 150 146 151 }; 147 152 -
trunk/VUT/GtpVisibilityPreprocessor/src/default.env
r451 r459 13 13 #;../data/vienna/vienna-plane.x3d 14 14 # filename ../data/vienna/viewcells-25-sel.x3d 15 #filename ../data/atlanta/atlanta2.x3d15 filename ../data/atlanta/atlanta2.x3d 16 16 # filename ../data/soda/soda.dat 17 filename ../data/soda/soda5.dat17 # filename ../data/soda/soda5.dat 18 18 } 19 19 … … 64 64 RssPreprocessor { 65 65 samplesPerPass 100000 66 initialSamples 50000067 vssSamples 500000068 vssSamplesPerPass 10000066 initialSamples 1000000 67 vssSamples 1000000 68 vssSamplesPerPass 50000 69 69 useImportanceSampling true 70 70 } … … 75 75 76 76 maxDepth 40 77 minPvs 577 minPvs 3 78 78 minRays 30 79 79 minSize 0.001 … … 90 90 91 91 interleaveDirSplits true 92 dirSplitDepth 992 dirSplitDepth 0 93 93 94 94 numberOfEndPointDomains 10000 … … 179 179 epsilon 0.005 180 180 } 181 182 181 183 182 # random polygon = 1 -
trunk/VUT/GtpVisibilityPreprocessor/src/preprocessor.pro
r450 r459 17 17 18 18 # debuc config 19 CONFIG += console warn_off thread debug19 CONFIG += console warn_off thread release 20 20 21 21 # RELEASE CONFIG
Note: See TracChangeset
for help on using the changeset viewer.