Changeset 463 for trunk/VUT/GtpVisibilityPreprocessor
- Timestamp:
- 12/14/05 09:02:38 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Environment.cpp
r462 r463 1496 1496 RegisterOption("VssTree.splitType", optString, "split=", "queries"); 1497 1497 RegisterOption("VssTree.splitUseOnlyDrivingAxis", optBool, "splitdriving=", "false"); 1498 1499 1498 RegisterOption("VssTree.useRss", optBool, "rss=", "false"); 1500 1499 RegisterOption("VssTree.numberOfEndPointDomains", optInt, "endpoints=", "10000"); … … 1515 1514 1516 1515 RegisterOption("VssTree.interleaveDirSplits", optBool, "interleavedirsplits", "true"); 1517 1518 1516 RegisterOption("VssTree.dirSplitDepth", optInt, "dirsplidepth=", "10"); 1519 1517 1520 1521 1518 1522 1519 RegisterOption("RssPreprocessor.initialSamples", 1523 1524 1520 optInt, 1525 1526 1521 "-initial_samples=", 1527 1528 1522 "100000"); 1529 1523 1530 1531 1532 1524 RegisterOption("RssPreprocessor.vssSamples", 1533 1534 1525 optInt, 1535 1536 1526 "-vss_samples=", 1537 1538 1527 "1000000"); 1539 1540 1528 1541 1542 1529 RegisterOption("RssPreprocessor.vssSamplesPerPass", 1543 1544 1530 optInt, 1545 1546 1531 "-vss_samples_per_pass=", 1547 1548 1532 "1000"); 1549 1533 1550 1551 1552 1534 RegisterOption("RssPreprocessor.samplesPerPass", 1553 1554 1535 optInt, 1555 1556 1536 "-samples_per_pass=", 1557 1558 1537 "100000"); 1559 1538 1560 1561 1562 1539 RegisterOption("RssPreprocessor.useImportanceSampling", 1563 1564 1540 optBool, 1565 1566 1541 "-vss_use_importance=", 1567 1568 1542 "true"); 1569 1543 1570 1571 1544 RegisterOption("RssTree.maxDepth", optInt, "kd_depth=", "12"); 1572 1573 1545 RegisterOption("RssTree.minPvs", optInt, "kd_minpvs=", "1"); 1574 1575 1546 RegisterOption("RssTree.minRays", optInt, "kd_minrays=", "10"); 1576 1577 1547 RegisterOption("RssTree.maxCostRatio", optFloat, "maxcost=", "0.95"); 1578 1579 1548 RegisterOption("RssTree.maxRayContribution", optFloat, "maxraycontrib=", "0.5"); 1580 1549 1581 1582 1583 1550 RegisterOption("RssTree.epsilon", optFloat, "kd_eps=", "1e-6"); 1584 1585 1551 RegisterOption("RssTree.ct_div_ci", optFloat, "kd_ctdivci=", "1.0"); 1586 1587 1552 RegisterOption("RssTree.randomize", optBool, "randomize", "false"); 1588 1589 1553 RegisterOption("RssTree.splitType", optString, "split=", "queries"); 1590 1591 1554 RegisterOption("RssTree.splitUseOnlyDrivingAxis", optBool, "splitdriving=", "false"); 1592 1593 1594 1555 RegisterOption("RssTree.useRss", optBool, "rss=", "false"); 1595 1596 1597 1598 1556 1599 1557 RegisterOption("RssTree.numberOfEndPointDomains", optInt, "endpoints=", "10000"); 1600 1558 1601 1602 1603 1559 RegisterOption("RssTree.minSize", optFloat, "minsize=", "0.001"); 1604 1560 1605 1606 1607 1561 RegisterOption("RssTree.maxTotalMemory", optFloat, "mem=", "60.0"); 1608 1609 1562 RegisterOption("RssTree.maxStaticMemory", optFloat, "statmem=", "8.0"); 1610 1563 1611 1612 1613 1564 RegisterOption("RssTree.queryType", optString, "qtype=", "static"); 1614 1565 1615 1616 1617 1566 RegisterOption("RssTree.queryPosWeight", optFloat, "qposweight=", "0.0"); 1618 1619 1567 RegisterOption("RssTree.useRefDirSplits", optBool, "refdir", "false"); 1620 1621 1568 RegisterOption("RssTree.refDirAngle", optFloat, "refangle=", "10"); 1622 1623 1569 RegisterOption("RssTree.refDirBoxMaxSize", optFloat, "refboxsize=", "0.1"); 1624 1625 1570 RegisterOption("RssTree.accessTimeThreshold", optInt, "accesstime=", "1000"); 1626 1627 1571 RegisterOption("RssTree.minCollapseDepth", optInt, "colldepth=", "4"); 1628 1572 1629 1630 1573 RegisterOption("RssTree.interleaveDirSplits", optBool, "interleavedirsplits", "true"); 1631 1632 1633 1574 RegisterOption("RssTree.dirSplitDepth", optInt, "dirsplidepth=", "10"); 1634 1635 1636 1575 1637 1576 -
trunk/VUT/GtpVisibilityPreprocessor/src/Makefile
r459 r463 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake ( 1.07a) (Qt 3.3.2) on: Mon Dec 05 10:27:3420053 # Generated by qmake (2.00a) (Qt 4.1.0-rc1) on: út 13. XII 21:49:08 2005 4 4 # Project: preprocessor.pro 5 5 # Template: app 6 # Command: $(QMAKE)-o Makefile preprocessor.pro6 # Command: qmake -win32 -o Makefile preprocessor.pro 7 7 ############################################################################# 8 8 9 ####### Compiler, tools and options 9 first: release 10 install: release-install 11 uninstall: release-uninstall 12 MAKEFILE = Makefile 13 QMAKE = qmake 14 DEL_FILE = del 15 CHK_DIR_EXISTS= if not exist 16 MKDIR = mkdir 17 COPY = copy /y 18 COPY_FILE = $(COPY) 19 COPY_DIR = xcopy /s /q /y /i 20 INSTALL_FILE = $(COPY_FILE) 21 INSTALL_DIR = $(COPY_DIR) 22 DEL_FILE = del 23 SYMLINK = 24 DEL_DIR = rmdir 25 MOVE = move 26 CHK_DIR_EXISTS= if not exist 27 MKDIR = mkdir 28 SUBTARGETS = \ 29 release \ 30 debug 10 31 11 CC = cl 12 CXX = cl 13 LEX = flex 14 YACC = byacc 15 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 LEXFLAGS = 18 YACCFLAGS =-d 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 LINK = "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe" 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 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 MOC = $(QTDIR)\bin\moc.exe 24 UIC = $(QTDIR)\bin\uic.exe 25 QMAKE = qmake 26 IDC = $(QTDIR)\bin\idc.exe 27 IDL = midl 28 ZIP = zip -r -9 29 COPY_FILE = copy 30 COPY_DIR = copy 31 DEL_FILE = del 32 DEL_DIR = rmdir 33 MOVE = move 34 CHK_DIR_EXISTS = if not exist 35 MKDIR = mkdir 36 INSTALL_FILE= $(COPY_FILE) 37 INSTALL_DIR = $(COPY_DIR) 32 release: $(MAKEFILE).Release FORCE 33 $(MAKE) -f $(MAKEFILE).Release 34 release-make_default: $(MAKEFILE).Release FORCE 35 $(MAKE) -f $(MAKEFILE).Release 36 release-make_first: $(MAKEFILE).Release FORCE 37 $(MAKE) -f $(MAKEFILE).Release first 38 release-all: $(MAKEFILE).Release FORCE 39 $(MAKE) -f $(MAKEFILE).Release all 40 release-clean: $(MAKEFILE).Release FORCE 41 $(MAKE) -f $(MAKEFILE).Release clean 42 release-distclean: $(MAKEFILE).Release FORCE 43 $(MAKE) -f $(MAKEFILE).Release distclean 44 release-install: $(MAKEFILE).Release FORCE 45 $(MAKE) -f $(MAKEFILE).Release install 46 release-uninstall: $(MAKEFILE).Release FORCE 47 $(MAKE) -f $(MAKEFILE).Release uninstall 48 debug: $(MAKEFILE).Debug FORCE 49 $(MAKE) -f $(MAKEFILE).Debug 50 debug-make_default: $(MAKEFILE).Debug FORCE 51 $(MAKE) -f $(MAKEFILE).Debug 52 debug-make_first: $(MAKEFILE).Debug FORCE 53 $(MAKE) -f $(MAKEFILE).Debug first 54 debug-all: $(MAKEFILE).Debug FORCE 55 $(MAKE) -f $(MAKEFILE).Debug all 56 debug-clean: $(MAKEFILE).Debug FORCE 57 $(MAKE) -f $(MAKEFILE).Debug clean 58 debug-distclean: $(MAKEFILE).Debug FORCE 59 $(MAKE) -f $(MAKEFILE).Debug distclean 60 debug-install: $(MAKEFILE).Debug FORCE 61 $(MAKE) -f $(MAKEFILE).Debug install 62 debug-uninstall: $(MAKEFILE).Debug FORCE 63 $(MAKE) -f $(MAKEFILE).Debug uninstall 38 64 39 ####### Files 65 Makefile: preprocessor.pro D:/Qt/4.1.0-rc1/mkspecs/win32-msvc.net\qmake.conf D:/Qt/4.1.0-rc1/mkspecs/qconfig.pri \ 66 D:\Qt\4.1.0-rc1\mkspecs\features\qt_config.prf \ 67 D:\Qt\4.1.0-rc1\mkspecs\features\exclusive_builds.prf \ 68 D:\Qt\4.1.0-rc1\mkspecs\features\default_pre.prf \ 69 D:\Qt\4.1.0-rc1\mkspecs\features\win32\default_pre.prf \ 70 D:\Qt\4.1.0-rc1\mkspecs\features\release.prf \ 71 D:\Qt\4.1.0-rc1\mkspecs\features\debug_and_release.prf \ 72 D:\Qt\4.1.0-rc1\mkspecs\features\default_post.prf \ 73 D:\Qt\4.1.0-rc1\mkspecs\features\win32\thread.prf \ 74 D:\Qt\4.1.0-rc1\mkspecs\features\warn_off.prf \ 75 D:\Qt\4.1.0-rc1\mkspecs\features\win32\console.prf \ 76 D:\Qt\4.1.0-rc1\mkspecs\features\win32\rtti.prf \ 77 D:\Qt\4.1.0-rc1\mkspecs\features\win32\exceptions.prf \ 78 D:\Qt\4.1.0-rc1\mkspecs\features\win32\stl.prf \ 79 D:\Qt\4.1.0-rc1\mkspecs\features\shared.prf \ 80 D:\Qt\4.1.0-rc1\mkspecs\features\qt.prf \ 81 D:\Qt\4.1.0-rc1\mkspecs\features\moc.prf \ 82 D:\Qt\4.1.0-rc1\mkspecs\features\resources.prf \ 83 D:\Qt\4.1.0-rc1\mkspecs\features\uic.prf 84 $(QMAKE) -win32 -o Makefile preprocessor.pro 85 D:/Qt/4.1.0-rc1/mkspecs/qconfig.pri: 86 D:\Qt\4.1.0-rc1\mkspecs\features\qt_config.prf: 87 D:\Qt\4.1.0-rc1\mkspecs\features\exclusive_builds.prf: 88 D:\Qt\4.1.0-rc1\mkspecs\features\default_pre.prf: 89 D:\Qt\4.1.0-rc1\mkspecs\features\win32\default_pre.prf: 90 D:\Qt\4.1.0-rc1\mkspecs\features\release.prf: 91 D:\Qt\4.1.0-rc1\mkspecs\features\debug_and_release.prf: 92 D:\Qt\4.1.0-rc1\mkspecs\features\default_post.prf: 93 D:\Qt\4.1.0-rc1\mkspecs\features\win32\thread.prf: 94 D:\Qt\4.1.0-rc1\mkspecs\features\warn_off.prf: 95 D:\Qt\4.1.0-rc1\mkspecs\features\win32\console.prf: 96 D:\Qt\4.1.0-rc1\mkspecs\features\win32\rtti.prf: 97 D:\Qt\4.1.0-rc1\mkspecs\features\win32\exceptions.prf: 98 D:\Qt\4.1.0-rc1\mkspecs\features\win32\stl.prf: 99 D:\Qt\4.1.0-rc1\mkspecs\features\shared.prf: 100 D:\Qt\4.1.0-rc1\mkspecs\features\qt.prf: 101 D:\Qt\4.1.0-rc1\mkspecs\features\moc.prf: 102 D:\Qt\4.1.0-rc1\mkspecs\features\resources.prf: 103 D:\Qt\4.1.0-rc1\mkspecs\features\uic.prf: 104 qmake: qmake_all FORCE 105 @$(QMAKE) -win32 -o Makefile preprocessor.pro 40 106 41 HEADERS = Halton.h \ 42 VssRay.h \ 43 VssPreprocessor.h \ 44 RssTree.h 45 SOURCES = Preprocessor.cpp \ 46 SamplingPreprocessor.cpp \ 47 ExactPreprocessor.cpp \ 48 KdTree.cpp \ 49 Environment.cpp \ 50 gzstream.cpp \ 51 common.cpp \ 52 UnigraphicsParser.cpp \ 53 X3dExporter.cpp \ 54 SceneGraph.cpp \ 55 Material.cpp \ 56 Matrix4x4.cpp \ 57 Vector3.cpp \ 58 AxisAlignedBox3.cpp \ 59 Ray.cpp \ 60 main.cpp \ 61 Mesh.cpp \ 62 Exporter.cpp \ 63 Camera.cpp \ 64 X3dParser.cpp \ 65 MeshKdTree.cpp \ 66 Pvs.cpp \ 67 MutualVisibility.cpp \ 68 Triangle3.cpp \ 69 Rectangle3.cpp \ 70 Plane3.cpp \ 71 Polygon3.cpp \ 72 ViewCell.cpp \ 73 ViewCellBsp.cpp \ 74 Halton.cpp \ 75 VssRay.cpp \ 76 VssTree.cpp \ 77 VssPreprocessor.cpp \ 78 RenderSimulator.cpp \ 79 VspKdTree.cpp \ 80 RayInfo.cpp \ 81 RssTree.cpp \ 82 RssPreprocessor.cpp \ 83 ViewCellsManager.cpp \ 84 VspBspTree.cpp 85 OBJECTS = Preprocessor.obj \ 86 SamplingPreprocessor.obj \ 87 ExactPreprocessor.obj \ 88 KdTree.obj \ 89 Environment.obj \ 90 gzstream.obj \ 91 common.obj \ 92 UnigraphicsParser.obj \ 93 X3dExporter.obj \ 94 SceneGraph.obj \ 95 Material.obj \ 96 Matrix4x4.obj \ 97 Vector3.obj \ 98 AxisAlignedBox3.obj \ 99 Ray.obj \ 100 main.obj \ 101 Mesh.obj \ 102 Exporter.obj \ 103 Camera.obj \ 104 X3dParser.obj \ 105 MeshKdTree.obj \ 106 Pvs.obj \ 107 MutualVisibility.obj \ 108 Triangle3.obj \ 109 Rectangle3.obj \ 110 Plane3.obj \ 111 Polygon3.obj \ 112 ViewCell.obj \ 113 ViewCellBsp.obj \ 114 Halton.obj \ 115 VssRay.obj \ 116 VssTree.obj \ 117 VssPreprocessor.obj \ 118 RenderSimulator.obj \ 119 VspKdTree.obj \ 120 RayInfo.obj \ 121 RssTree.obj \ 122 RssPreprocessor.obj \ 123 ViewCellsManager.obj \ 124 VspBspTree.obj 125 FORMS = 126 UICDECLS = 127 UICIMPLS = 128 SRCMOC = 129 OBJMOC = 130 DIST = 131 TARGET = preprocessor.exe 107 qmake_all: FORCE 132 108 133 ####### Implicit rules 109 make_default: release-make_default debug-make_default FORCE 110 make_first: release-make_first debug-make_first FORCE 111 all: release-all debug-all FORCE 112 clean: release-clean debug-clean FORCE 113 -$(DEL_FILE) preprocessor.exp 114 distclean: release-distclean debug-distclean FORCE 115 -$(DEL_FILE) Makefile 134 116 135 .SUFFIXES: .c .cpp .cc .cxx .C 117 release-mocclean: $(MAKEFILE).Release 118 $(MAKE) -f $(MAKEFILE).Release mocclean 119 debug-mocclean: $(MAKEFILE).Debug 120 $(MAKE) -f $(MAKEFILE).Debug mocclean 121 mocclean: release-mocclean debug-mocclean 136 122 137 {.}.cpp{}.obj:: 138 $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo @<< 139 $< 140 << 141 142 {.}.cc{}.obj:: 143 $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo @<< 144 $< 145 << 146 147 {.}.cxx{}.obj:: 148 $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo @<< 149 $< 150 << 151 152 {.}.C{}.obj:: 153 $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo @<< 154 $< 155 << 156 157 {.}.c{}.obj:: 158 $(CC) -c $(CFLAGS) $(INCPATH) -Fo @<< 159 $< 160 << 161 162 ####### Build rules 163 164 all: Makefile $(TARGET) 165 166 $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) 167 $(LINK) $(LFLAGS) /OUT:$(TARGET) @<< 168 $(OBJECTS) $(OBJMOC) $(LIBS) 169 << 170 171 172 mocables: $(SRCMOC) 173 uicables: $(UICIMPLS) $(UICDECLS) 174 175 Makefile: preprocessor.pro C:\Qt\3.3.2\mkspecs\win32-msvc.net\qmake.conf C:\Qt\3.3.2\lib\qtmain.prl 176 $(QMAKE) -o Makefile preprocessor.pro 177 qmake: 178 @$(QMAKE) -o Makefile preprocessor.pro 179 180 dist: 181 $(ZIP) preprocessor.zip $(SOURCES) $(HEADERS) $(DIST) $(FORMS) d:/gametools/svn/trunk/VUT/GtpVisibilityPreprocessor/src/preprocessor.pro C:\Qt\3.3.2\lib\qtmain.prl 182 183 uiclean: 184 mocclean: 185 clean: uiclean mocclean 186 -$(DEL_FILE) Preprocessor.obj 187 -$(DEL_FILE) SamplingPreprocessor.obj 188 -$(DEL_FILE) ExactPreprocessor.obj 189 -$(DEL_FILE) KdTree.obj 190 -$(DEL_FILE) Environment.obj 191 -$(DEL_FILE) gzstream.obj 192 -$(DEL_FILE) common.obj 193 -$(DEL_FILE) UnigraphicsParser.obj 194 -$(DEL_FILE) X3dExporter.obj 195 -$(DEL_FILE) SceneGraph.obj 196 -$(DEL_FILE) Material.obj 197 -$(DEL_FILE) Matrix4x4.obj 198 -$(DEL_FILE) Vector3.obj 199 -$(DEL_FILE) AxisAlignedBox3.obj 200 -$(DEL_FILE) Ray.obj 201 -$(DEL_FILE) main.obj 202 -$(DEL_FILE) Mesh.obj 203 -$(DEL_FILE) Exporter.obj 204 -$(DEL_FILE) Camera.obj 205 -$(DEL_FILE) X3dParser.obj 206 -$(DEL_FILE) MeshKdTree.obj 207 -$(DEL_FILE) Pvs.obj 208 -$(DEL_FILE) MutualVisibility.obj 209 -$(DEL_FILE) Triangle3.obj 210 -$(DEL_FILE) Rectangle3.obj 211 -$(DEL_FILE) Plane3.obj 212 -$(DEL_FILE) Polygon3.obj 213 -$(DEL_FILE) ViewCell.obj 214 -$(DEL_FILE) ViewCellBsp.obj 215 -$(DEL_FILE) Halton.obj 216 -$(DEL_FILE) VssRay.obj 217 -$(DEL_FILE) VssTree.obj 218 -$(DEL_FILE) VssPreprocessor.obj 219 -$(DEL_FILE) RenderSimulator.obj 220 -$(DEL_FILE) VspKdTree.obj 221 -$(DEL_FILE) RayInfo.obj 222 -$(DEL_FILE) RssTree.obj 223 -$(DEL_FILE) RssPreprocessor.obj 224 -$(DEL_FILE) ViewCellsManager.obj 225 -$(DEL_FILE) VspBspTree.obj 226 227 228 123 release-mocables: $(MAKEFILE).Release 124 $(MAKE) -f $(MAKEFILE).Release mocables 125 debug-mocables: $(MAKEFILE).Debug 126 $(MAKE) -f $(MAKEFILE).Debug mocables 127 mocables: release-mocables debug-mocables 229 128 FORCE: 230 129 231 distclean: clean 232 -$(DEL_FILE) $(TARGET) 233 234 ####### Compile 235 236 Preprocessor.obj: Preprocessor.cpp \ 237 SceneGraph.h \ 238 Exporter.h \ 239 UnigraphicsParser.h \ 240 X3dParser.h \ 241 Preprocessor.h \ 242 ViewCell.h \ 243 Environment.h \ 244 ViewCellsManager.h \ 245 ViewCellBsp.h \ 246 VspBspTree.h \ 247 VspKdTree.h \ 248 Containers.h \ 249 AxisAlignedBox3.h \ 250 Rectangle3.h \ 251 Matrix4x4.h \ 252 Vector3.h \ 253 Plane3.h \ 254 common.h \ 255 Material.h \ 256 VssRay.h \ 257 Ray.h \ 258 Parser.h \ 259 Mesh.h \ 260 KdTree.h \ 261 Intersectable.h \ 262 Pvs.h \ 263 Polygon3.h \ 264 Statistics.h \ 265 RayInfo.h \ 266 267 268 SamplingPreprocessor.obj: SamplingPreprocessor.cpp \ 269 SceneGraph.h \ 270 KdTree.h \ 271 SamplingPreprocessor.h \ 272 X3dExporter.h \ 273 Environment.h \ 274 MutualVisibility.h \ 275 Polygon3.h \ 276 ViewCell.h \ 277 ViewCellsManager.h \ 278 RenderSimulator.h \ 279 Containers.h \ 280 AxisAlignedBox3.h \ 281 Rectangle3.h \ 282 Matrix4x4.h \ 283 Vector3.h \ 284 Plane3.h \ 285 common.h \ 286 Ray.h \ 287 Pvs.h \ 288 Preprocessor.h \ 289 VssRay.h \ 290 Mesh.h \ 291 Intersectable.h \ 292 Material.h \ 293 Exporter.h \ 294 Statistics.h \ 295 296 297 ExactPreprocessor.obj: ExactPreprocessor.cpp \ 298 ExactPreprocessor.h \ 299 Preprocessor.h \ 300 Containers.h \ 301 Mesh.h \ 302 KdTree.h \ 303 Intersectable.h \ 304 Plane3.h \ 305 Matrix4x4.h \ 306 AxisAlignedBox3.h \ 307 Material.h \ 308 Pvs.h \ 309 Rectangle3.h \ 310 Vector3.h \ 311 common.h \ 312 Ray.h \ 313 314 315 KdTree.obj: KdTree.cpp \ 316 Environment.h \ 317 Mesh.h \ 318 KdTree.h \ 319 common.h \ 320 Intersectable.h \ 321 Plane3.h \ 322 Matrix4x4.h \ 323 AxisAlignedBox3.h \ 324 Material.h \ 325 Pvs.h \ 326 Rectangle3.h \ 327 Vector3.h \ 328 Containers.h \ 329 Ray.h \ 330 331 332 Environment.obj: Environment.cpp \ 333 gzstream.h \ 334 common.h \ 335 Environment.h \ 336 Vector3.h \ 337 338 339 gzstream.obj: gzstream.cpp \ 340 gzstream.h \ 341 342 343 common.obj: common.cpp \ 344 common.h \ 345 346 347 UnigraphicsParser.obj: UnigraphicsParser.cpp \ 348 Vector3.h \ 349 Mesh.h \ 350 SceneGraph.h \ 351 UnigraphicsParser.h \ 352 Material.h \ 353 Environment.h \ 354 common.h \ 355 Intersectable.h \ 356 Plane3.h \ 357 Matrix4x4.h \ 358 AxisAlignedBox3.h \ 359 Pvs.h \ 360 Rectangle3.h \ 361 Containers.h \ 362 Parser.h \ 363 364 365 X3dExporter.obj: X3dExporter.cpp \ 366 common.h \ 367 SceneGraph.h \ 368 X3dExporter.h \ 369 Mesh.h \ 370 KdTree.h \ 371 ViewCellBsp.h \ 372 ViewCell.h \ 373 Polygon3.h \ 374 VssRay.h \ 375 VspKdTree.h \ 376 VssTree.h \ 377 VspBspTree.h \ 378 RssTree.h \ 379 Containers.h \ 380 AxisAlignedBox3.h \ 381 Rectangle3.h \ 382 Matrix4x4.h \ 383 Vector3.h \ 384 Plane3.h \ 385 Exporter.h \ 386 Material.h \ 387 Ray.h \ 388 Intersectable.h \ 389 Pvs.h \ 390 Statistics.h \ 391 RayInfo.h \ 392 393 394 SceneGraph.obj: SceneGraph.cpp \ 395 SceneGraph.h \ 396 X3dExporter.h \ 397 Intersectable.h \ 398 Containers.h \ 399 AxisAlignedBox3.h \ 400 Rectangle3.h \ 401 Matrix4x4.h \ 402 Vector3.h \ 403 Plane3.h \ 404 common.h \ 405 Exporter.h \ 406 VssRay.h \ 407 Material.h \ 408 Ray.h \ 409 Pvs.h \ 410 411 412 Material.obj: Material.cpp \ 413 common.h \ 414 Material.h \ 415 416 417 Matrix4x4.obj: Matrix4x4.cpp \ 418 Matrix4x4.h \ 419 Vector3.h \ 420 common.h \ 421 422 423 Vector3.obj: Vector3.cpp \ 424 Matrix4x4.h \ 425 Vector3.h \ 426 Halton.h \ 427 common.h \ 428 429 430 AxisAlignedBox3.obj: AxisAlignedBox3.cpp \ 431 AxisAlignedBox3.h \ 432 Ray.h \ 433 Polygon3.h \ 434 Rectangle3.h \ 435 Matrix4x4.h \ 436 Vector3.h \ 437 Plane3.h \ 438 common.h \ 439 Containers.h \ 440 Mesh.h \ 441 Intersectable.h \ 442 Material.h \ 443 Pvs.h \ 444 445 446 Ray.obj: Ray.cpp \ 447 Ray.h \ 448 Plane3.h \ 449 VssRay.h \ 450 Matrix4x4.h \ 451 Vector3.h \ 452 common.h \ 453 454 455 main.obj: main.cpp \ 456 SamplingPreprocessor.h \ 457 VssPreprocessor.h \ 458 RssPreprocessor.h \ 459 ExactPreprocessor.h \ 460 Parser.h \ 461 UnigraphicsParser.h \ 462 X3dParser.h \ 463 Environment.h \ 464 Camera.h \ 465 MeshKdTree.h \ 466 Exporter.h \ 467 X3dExporter.h \ 468 ViewCell.h \ 469 SceneGraph.h \ 470 Preprocessor.h \ 471 VssRay.h \ 472 Containers.h \ 473 Mesh.h \ 474 KdTree.h \ 475 Intersectable.h \ 476 Plane3.h \ 477 Matrix4x4.h \ 478 AxisAlignedBox3.h \ 479 Material.h \ 480 Pvs.h \ 481 Rectangle3.h \ 482 Vector3.h \ 483 common.h \ 484 Ray.h \ 485 486 487 Mesh.obj: Mesh.cpp \ 488 Ray.h \ 489 Mesh.h \ 490 MeshKdTree.h \ 491 Triangle3.h \ 492 Matrix4x4.h \ 493 Vector3.h \ 494 common.h \ 495 Intersectable.h \ 496 Plane3.h \ 497 AxisAlignedBox3.h \ 498 Material.h \ 499 Pvs.h \ 500 Rectangle3.h \ 501 Containers.h \ 502 503 504 Exporter.obj: Exporter.cpp \ 505 X3dExporter.h \ 506 Exporter.h \ 507 Containers.h \ 508 VssRay.h \ 509 Material.h \ 510 Vector3.h \ 511 Ray.h \ 512 common.h \ 513 Matrix4x4.h \ 514 515 516 Camera.obj: Camera.cpp \ 517 Camera.h \ 518 Ray.h \ 519 KdTree.h \ 520 Mesh.h \ 521 Exporter.h \ 522 Vector3.h \ 523 AxisAlignedBox3.h \ 524 common.h \ 525 Rectangle3.h \ 526 Matrix4x4.h \ 527 Plane3.h \ 528 Containers.h \ 529 Pvs.h \ 530 Intersectable.h \ 531 Material.h \ 532 VssRay.h \ 533 534 535 X3dParser.obj: X3dParser.cpp \ 536 X3dParser.h \ 537 X3dParserXerces.h \ 538 Mesh.h \ 539 SceneGraph.h \ 540 Triangle3.h \ 541 ViewCellsManager.h \ 542 Parser.h \ 543 Containers.h \ 544 Intersectable.h \ 545 Plane3.h \ 546 Matrix4x4.h \ 547 AxisAlignedBox3.h \ 548 Material.h \ 549 Pvs.h \ 550 Rectangle3.h \ 551 Vector3.h \ 552 common.h \ 553 Ray.h \ 554 VssRay.h \ 555 556 557 MeshKdTree.obj: MeshKdTree.cpp \ 558 Environment.h \ 559 Mesh.h \ 560 MeshKdTree.h \ 561 common.h \ 562 Intersectable.h \ 563 Plane3.h \ 564 Matrix4x4.h \ 565 AxisAlignedBox3.h \ 566 Material.h \ 567 Pvs.h \ 568 Rectangle3.h \ 569 Vector3.h \ 570 Containers.h \ 571 Ray.h \ 572 573 574 Pvs.obj: Pvs.cpp \ 575 Pvs.h \ 576 577 578 MutualVisibility.obj: MutualVisibility.cpp \ 579 KdTree.h \ 580 AxisAlignedBox3.h \ 581 Ray.h \ 582 MutualVisibility.h \ 583 Exporter.h \ 584 Mesh.h \ 585 Triangle3.h \ 586 SceneGraph.h \ 587 Containers.h \ 588 Pvs.h \ 589 Rectangle3.h \ 590 Matrix4x4.h \ 591 Vector3.h \ 592 Plane3.h \ 593 common.h \ 594 Material.h \ 595 VssRay.h \ 596 Intersectable.h \ 597 598 599 Triangle3.obj: Triangle3.cpp \ 600 Triangle3.h \ 601 Vector3.h \ 602 common.h \ 603 604 605 Rectangle3.obj: Rectangle3.cpp \ 606 Rectangle3.h \ 607 Vector3.h \ 608 common.h \ 609 610 611 Plane3.obj: Plane3.cpp \ 612 Plane3.h \ 613 Matrix4x4.h \ 614 Vector3.h \ 615 common.h \ 616 617 618 Polygon3.obj: Polygon3.cpp \ 619 Polygon3.h \ 620 Mesh.h \ 621 ViewCellBsp.h \ 622 AxisAlignedBox3.h \ 623 Ray.h \ 624 Containers.h \ 625 Intersectable.h \ 626 Plane3.h \ 627 Matrix4x4.h \ 628 Material.h \ 629 Pvs.h \ 630 Rectangle3.h \ 631 Vector3.h \ 632 common.h \ 633 Statistics.h \ 634 VssRay.h \ 635 636 637 ViewCell.obj: ViewCell.cpp \ 638 ViewCell.h \ 639 Mesh.h \ 640 Intersectable.h \ 641 MeshKdTree.h \ 642 Triangle3.h \ 643 Containers.h \ 644 Ray.h \ 645 Plane3.h \ 646 Matrix4x4.h \ 647 AxisAlignedBox3.h \ 648 Material.h \ 649 Pvs.h \ 650 Rectangle3.h \ 651 Vector3.h \ 652 common.h \ 653 654 655 ViewCellBsp.obj: ViewCellBsp.cpp \ 656 Plane3.h \ 657 ViewCellBsp.h \ 658 Mesh.h \ 659 common.h \ 660 ViewCell.h \ 661 Environment.h \ 662 Polygon3.h \ 663 Ray.h \ 664 AxisAlignedBox3.h \ 665 Exporter.h \ 666 Vector3.h \ 667 Containers.h \ 668 Statistics.h \ 669 VssRay.h \ 670 Intersectable.h \ 671 Matrix4x4.h \ 672 Material.h \ 673 Pvs.h \ 674 Rectangle3.h \ 675 676 677 Halton.obj: Halton.cpp \ 678 Halton.h \ 679 680 681 VssRay.obj: VssRay.cpp \ 682 VssRay.h \ 683 AxisAlignedBox3.h \ 684 Vector3.h \ 685 Ray.h \ 686 common.h \ 687 Matrix4x4.h \ 688 Rectangle3.h \ 689 Plane3.h \ 690 691 692 VssTree.obj: VssTree.cpp \ 693 VssTree.h \ 694 Environment.h \ 695 VssRay.h \ 696 Intersectable.h \ 697 Ray.h \ 698 AxisAlignedBox3.h \ 699 Statistics.h \ 700 Vector3.h \ 701 common.h \ 702 Matrix4x4.h \ 703 Rectangle3.h \ 704 Plane3.h \ 705 Pvs.h \ 706 707 708 VssPreprocessor.obj: VssPreprocessor.cpp \ 709 SceneGraph.h \ 710 KdTree.h \ 711 VssPreprocessor.h \ 712 X3dExporter.h \ 713 Environment.h \ 714 MutualVisibility.h \ 715 Polygon3.h \ 716 ViewCell.h \ 717 VssRay.h \ 718 VssTree.h \ 719 ViewCellsManager.h \ 720 Containers.h \ 721 AxisAlignedBox3.h \ 722 Rectangle3.h \ 723 Matrix4x4.h \ 724 Vector3.h \ 725 Plane3.h \ 726 common.h \ 727 Ray.h \ 728 Pvs.h \ 729 Preprocessor.h \ 730 Mesh.h \ 731 Intersectable.h \ 732 Material.h \ 733 Exporter.h \ 734 Statistics.h \ 735 736 737 RenderSimulator.obj: RenderSimulator.cpp \ 738 RenderSimulator.h \ 739 KdTree.h \ 740 ViewCellBsp.h \ 741 ViewCell.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 \ 760 761 762 VspKdTree.obj: VspKdTree.cpp \ 763 VspKdTree.h \ 764 Environment.h \ 765 VssRay.h \ 766 Intersectable.h \ 767 Ray.h \ 768 RayInfo.h \ 769 AxisAlignedBox3.h \ 770 Statistics.h \ 771 Containers.h \ 772 Vector3.h \ 773 common.h \ 774 Matrix4x4.h \ 775 Rectangle3.h \ 776 Plane3.h \ 777 Pvs.h \ 778 779 780 RayInfo.obj: RayInfo.cpp \ 781 RayInfo.h \ 782 Ray.h \ 783 VssRay.h \ 784 Plane3.h \ 785 Matrix4x4.h \ 786 Vector3.h \ 787 common.h \ 788 789 790 RssTree.obj: RssTree.cpp \ 791 RssTree.h \ 792 Environment.h \ 793 VssRay.h \ 794 Intersectable.h \ 795 Ray.h \ 796 Containers.h \ 797 AxisAlignedBox3.h \ 798 Statistics.h \ 799 Vector3.h \ 800 common.h \ 801 Matrix4x4.h \ 802 Rectangle3.h \ 803 Plane3.h \ 804 Pvs.h \ 805 806 807 RssPreprocessor.obj: RssPreprocessor.cpp \ 808 SceneGraph.h \ 809 KdTree.h \ 810 RssPreprocessor.h \ 811 X3dExporter.h \ 812 Environment.h \ 813 MutualVisibility.h \ 814 Polygon3.h \ 815 ViewCell.h \ 816 VssRay.h \ 817 RssTree.h \ 818 ViewCellBsp.h \ 819 Containers.h \ 820 AxisAlignedBox3.h \ 821 Rectangle3.h \ 822 Matrix4x4.h \ 823 Vector3.h \ 824 Plane3.h \ 825 common.h \ 826 Ray.h \ 827 Pvs.h \ 828 Preprocessor.h \ 829 Mesh.h \ 830 Intersectable.h \ 831 Material.h \ 832 Exporter.h \ 833 Statistics.h \ 834 835 836 ViewCellsManager.obj: ViewCellsManager.cpp \ 837 ViewCellsManager.h \ 838 RenderSimulator.h \ 839 Mesh.h \ 840 Triangle3.h \ 841 ViewCell.h \ 842 Environment.h \ 843 X3dParser.h \ 844 ViewCellBsp.h \ 845 KdTree.h \ 846 VspKdTree.h \ 847 Exporter.h \ 848 VspBspTree.h \ 849 Ray.h \ 850 VssRay.h \ 851 Containers.h \ 852 Matrix4x4.h \ 853 Vector3.h \ 854 common.h \ 855 Statistics.h \ 856 Intersectable.h \ 857 Plane3.h \ 858 AxisAlignedBox3.h \ 859 Material.h \ 860 Pvs.h \ 861 Rectangle3.h \ 862 Parser.h \ 863 Polygon3.h \ 864 RayInfo.h \ 865 866 867 VspBspTree.obj: VspBspTree.cpp \ 868 Plane3.h \ 869 VspBspTree.h \ 870 Mesh.h \ 871 common.h \ 872 ViewCell.h \ 873 Environment.h \ 874 Polygon3.h \ 875 Ray.h \ 876 AxisAlignedBox3.h \ 877 Exporter.h \ 878 ViewCellBsp.h \ 879 Vector3.h \ 880 Containers.h \ 881 Statistics.h \ 882 VssRay.h \ 883 RayInfo.h \ 884 Intersectable.h \ 885 Matrix4x4.h \ 886 Material.h \ 887 Pvs.h \ 888 Rectangle3.h \ 889 890 891 ####### Install 892 893 install: 894 895 uninstall: 896 130 $(MAKEFILE).Release: Makefile 131 $(MAKEFILE).Debug: Makefile -
trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp
r462 r463 14 14 static bool useViewSpaceBox = true; 15 15 static bool use2dSampling = false; 16 static bool fromBoxVisibility = true;16 static bool fromBoxVisibility = false; 17 17 18 18 static bool exportPvs = false; 19 static int numExportRays = 10000; 19 static bool exportRssTree = false; 20 21 static int numExportRays = 5000; 20 22 // static int numExportRays = 0; 23 24 static bool useViewcells = false; 21 25 22 26 RssPreprocessor::RssPreprocessor(): … … 192 196 { 193 197 int num; 198 199 194 200 195 201 float avgPvsSize; … … 198 204 float avgRayLengthEntropy; 199 205 float avgImportance; 200 206 float avgRays; 201 207 rssTree->GetTreeStatistics( 202 208 avgPvsSize, 209 avgRays, 203 210 avgRayContribution, 204 211 avgPvsEntropy, … … 208 215 cout<< 209 216 "#AVG_PVS_SIZE\n"<<avgPvsSize<<endl<< 217 "#AVG_RAYS\n"<<avgRays<<endl<< 210 218 "#AVG_RAY_CONTRIB\n"<<avgRayContribution<<endl<< 211 219 "#AVG_PVS_ENTROPY\n"<<avgPvsEntropy<<endl<< … … 485 493 } 486 494 487 488 489 495 if (useViewcells) 496 // construct view cells 497 mViewCellsManager->Construct(mObjects, mVssRays, mViewSpaceBox); 490 498 491 499 rssTree = new RssTree; … … 498 506 499 507 cout<<"RssTree root PVS size = "<<rssTree->GetRootPvsSize()<<endl; 500 501 ExportRssTree("rss-tree-100.x3d", rssTree, Vector3(1,0,0)); 502 ExportRssTree("rss-tree-001.x3d", rssTree, Vector3(0,0,1)); 503 ExportRssTree("rss-tree-101.x3d", rssTree, Vector3(1,0,1)); 504 ExportRssTree("rss-tree-101m.x3d", rssTree, Vector3(-1,0,-1)); 505 506 ExportRssTreeLeaves(rssTree, 10); 508 509 if (exportRssTree) { 510 ExportRssTree("rss-tree-100.x3d", rssTree, Vector3(1,0,0)); 511 ExportRssTree("rss-tree-001.x3d", rssTree, Vector3(0,0,1)); 512 ExportRssTree("rss-tree-101.x3d", rssTree, Vector3(1,0,1)); 513 ExportRssTree("rss-tree-101m.x3d", rssTree, Vector3(-1,0,-1)); 514 ExportRssTreeLeaves(rssTree, 10); 515 } 507 516 508 517 if (exportPvs) { … … 558 567 } 559 568 560 float avgPvs = GetAvgPvsSize(rssTree, kdViewcells); 561 cout<<"Average PVS size = "<<avgPvs<<endl; 569 if (useViewcells) { 570 float avgPvs = GetAvgPvsSize(rssTree, kdViewcells); 571 cout<<"Average PVS size = "<<avgPvs<<endl; 572 } 562 573 563 574 if (numExportRays) { … … 571 582 } 572 583 573 //-- prepare traversal rays for view cell intersections 574 RayContainer passRays; 575 576 VssRayContainer::const_iterator it, it_end = vssRays.end(); 577 578 for (it = vssRays.begin(); it != it_end; ++ it) 584 samples+=num; 585 586 if (useViewcells) { 587 588 //-- prepare traversal rays for view cell intersections 589 RayContainer passRays; 590 591 VssRayContainer::const_iterator it, it_end = vssRays.end(); 592 593 for (it = vssRays.begin(); it != it_end; ++ it) 579 594 passRays.push_back(new Ray(*(*it))); 580 581 int sampleContributions = 0;582 int contributingSamples = 0;583 584 /// compute view cell contribution of rays585 mViewCellsManager->ComputeSampleContributions(passRays,586 587 588 589 //-- save rays for post processing590 if (((int)storedRays.size() < mViewCellsManager->GetPostProcessSamples()) ||591 ((int)storedRays.size() < mViewCellsManager->GetVisualizationSamples()))592 {593 RayContainer::const_iterator it, it_end = passRays.end();594 595 for (it = passRays.begin(); it != it_end; ++ it)595 596 int sampleContributions = 0; 597 int contributingSamples = 0; 598 599 /// compute view cell contribution of rays 600 mViewCellsManager->ComputeSampleContributions(passRays, 601 sampleContributions, 602 contributingSamples); 603 604 //-- save rays for post processing 605 if (((int)storedRays.size() < mViewCellsManager->GetPostProcessSamples()) || 606 ((int)storedRays.size() < mViewCellsManager->GetVisualizationSamples())) 607 { 608 RayContainer::const_iterator it, it_end = passRays.end(); 609 610 for (it = passRays.begin(); it != it_end; ++ it) 596 611 storedRays.push_back(new Ray(*(*it))); 597 }598 else599 {600 CLEAR_CONTAINER(passRays);601 }602 603 samples+=num;604 float pvs = rssTree->GetAvgPvsSize();605 cout<<"*****************************\n";606 cout<<samples<<" avgPVS ="<<pvs<<endl;607 cout<<"sample contributions ="<<sampleContributions<<endl;608 cout<<"contributing sample ="<<contributingSamples<<endl;609 cout<<"RssTree root PVS size = "<<rssTree->GetRootPvsSize()<<endl;610 cout<<"*****************************\n";611 612 } 613 else 614 { 615 CLEAR_CONTAINER(passRays); 616 } 617 618 float pvs = rssTree->GetAvgPvsSize(); 619 cout<<"*****************************\n"; 620 cout<<samples<<" avgPVS ="<<pvs<<endl; 621 cout<<"sample contributions ="<<sampleContributions<<endl; 622 cout<<"contributing sample ="<<contributingSamples<<endl; 623 cout<<"RssTree root PVS size = "<<rssTree->GetRootPvsSize()<<endl; 624 cout<<"*****************************\n"; 625 } 626 612 627 if (exportPvs) { 613 628 char filename[64]; … … 623 638 } 624 639 625 //-- post process view cells 626 mViewCellsManager->PostProcess(mObjects, storedRays); 627 628 //-- several visualizations and statistics 629 mViewCellsManager->PrintStatistics(Debug); 630 631 //-- render simulation after merge 632 cout << "\nevaluating render time of final view cells ... "; 633 634 const SimulationStatistics ss = mViewCellsManager->SimulateRendering(); 635 636 cout << " finished" << endl; 637 638 cout << ss << endl; 639 Debug << ss << endl; 640 641 mViewCellsManager->Visualize(mObjects, storedRays); 642 640 if (useViewcells) { 641 642 //-- post process view cells 643 mViewCellsManager->PostProcess(mObjects, storedRays); 644 645 //-- several visualizations and statistics 646 mViewCellsManager->PrintStatistics(Debug); 647 648 //-- render simulation after merge 649 cout << "\nevaluating render time of final view cells ... "; 650 651 const SimulationStatistics ss = mViewCellsManager->SimulateRendering(); 652 653 cout << " finished" << endl; 654 655 cout << ss << endl; 656 Debug << ss << endl; 657 658 mViewCellsManager->Visualize(mObjects, storedRays); 659 } 660 643 661 delete rssTree; 644 662 -
trunk/VUT/GtpVisibilityPreprocessor/src/RssTree.cpp
r459 r463 234 234 } 235 235 } 236 ComputeEntropyImportance();237 238 236 mPvsSize = pvsSize; 239 237 mValidPvs = true; 238 239 ComputeEntropyImportance(); 240 240 } 241 241 } … … 294 294 if (mUseRss) 295 295 forcedBoundingBox = NULL; 296 296 297 mForcedBoundingBox = forcedBoundingBox; 297 298 for(VssRayContainer::const_iterator ri = rays.begin(); 298 299 ri != rays.end(); … … 1257 1258 ri++) { 1258 1259 RssTreeNode::RayInfo info(*ri); 1259 if ( ClipRay(info, bbox))1260 if (mForcedBoundingBox==NULL || ClipRay(info, bbox)) 1260 1261 AddRay(info); 1261 1262 } … … 1642 1643 RssTree::GetTreeStatistics( 1643 1644 float &avgPvsSize, 1645 float &avgRays, 1644 1646 float &avgRayContribution, 1645 1647 float &avgPvsEntropy, … … 1656 1658 float sumPvsEntropy = 0.0f; 1657 1659 float sumRayLengthEntropy = 0.0f; 1660 float sumRays = 0.0f; 1658 1661 1659 1662 int leaves = 0; … … 1666 1669 leaves++; 1667 1670 RssTreeLeaf *leaf = (RssTreeLeaf *)node; 1668 1671 leaf->UpdatePvsSize(); 1672 1669 1673 sumPvsSize += leaf->GetPvsSize(); 1670 1674 sumRayContribution += leaf->GetAvgRayContribution(); 1671 1675 sumPvsEntropy += leaf->mPvsEntropy; 1672 1676 sumRayLengthEntropy += leaf->mRayLengthEntropy; 1673 1677 sumRays += leaf->rays.size(); 1678 1674 1679 float imp = leaf->GetImportance(); 1675 1680 … … 1689 1694 1690 1695 avgPvsSize = sumPvsSize/(float)leaves; 1696 avgRays = sumRays/(float)leaves; 1691 1697 avgRayContribution = sumRayContribution/(float)leaves; 1692 1698 avgPvsEntropy = sumPvsEntropy/(float)leaves; … … 1757 1763 RssTree::ValidLeaf(RssTreeLeaf *leaf) const 1758 1764 { 1759 return leaf->rays.size() > termMinRays/4; 1765 return true; 1766 //return leaf->rays.size() > termMinRays/4; 1760 1767 } 1761 1768 … … 1766 1773 SimpleRayContainer &rays) 1767 1774 { 1775 1768 1776 int nrays = leaf->rays.size(); 1769 1777 for (int i=0; i < numberOfRays; i++) { 1770 // pickup 3 random rays 1771 int r1 = Random(nrays-1); 1772 int r2 = Random(nrays-1); 1773 int r3 = Random(nrays-1); 1774 1775 Vector3 o1 = leaf->rays[r1].GetOrigin(); 1776 1777 Vector3 o2 = leaf->rays[r2].GetOrigin(); 1778 1779 Vector3 o3 = leaf->rays[r3].GetOrigin(); 1780 1781 const float overlap = 0.0; 1778 bool useExtendedConvexCombination = (nrays >= 3) && (i > numberOfRays/2); 1779 1782 1780 1783 1781 Vector3 origin, direction; 1784 1782 // generate half of convex combination and half of random rays 1785 bool useExtendedConvexCombination = 0 && (i > numberOfRays/2);1786 1783 if (useExtendedConvexCombination) { 1784 // pickup 3 random rays 1785 int r1 = Random(nrays); 1786 int r2 = Random(nrays); 1787 int r3 = Random(nrays); 1788 1789 Vector3 o1 = leaf->rays[r1].GetOrigin(); 1790 1791 Vector3 o2 = leaf->rays[r2].GetOrigin(); 1792 1793 Vector3 o3 = leaf->rays[r3].GetOrigin(); 1794 1795 const float overlap = 0.0; 1796 1797 1787 1798 float w1, w2, w3; 1788 1799 GenerateExtendedConvexCombinationWeights(w1, w2, w3, overlap); -
trunk/VUT/GtpVisibilityPreprocessor/src/RssTree.h
r447 r463 229 229 // the bbox of the node 230 230 AxisAlignedBox3 bbox; 231 231 232 232 // the bbox of the node 233 233 AxisAlignedBox3 dirBBox; 234 234 235 235 // data for caching 236 236 long accesses; … … 514 514 // axis aligned bounding box of directions 515 515 AxisAlignedBox3 dirBBox; 516 516 517 // forced bounding box for from viewcell visibility 518 AxisAlignedBox3 *mForcedBoundingBox; 519 517 520 ///////////////////////////// 518 521 // Construction parameters … … 804 807 GetTreeStatistics( 805 808 float &avgPvsSize, 809 float &avgRays, 806 810 float &avgRayContribution, 807 811 float &avgPvsEntropy, -
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp
r462 r463 862 862 863 863 VssRay *ray = rayInf.mRay; 864 const int cf = rayInf.ComputeRayIntersection(candidatePlane, ray->mT); 864 float t; 865 const int cf = rayInf.ComputeRayIntersection(candidatePlane, t); 865 866 866 867 if (mSplitPlaneStrategy & LEAST_RAY_SPLITS) … … 907 908 { 908 909 float newLen = len * 909 (rayInf.GetMaxT() - rayInf.mRay->mT) /910 (rayInf.GetMaxT() - t) / 910 911 (rayInf.GetMaxT() - rayInf.GetMinT()); 911 912 … … 1305 1306 1306 1307 rays.pop_back(); 1307 1308 float t; 1308 1309 // get classification and receive new t 1309 const int cf = bRay.ComputeRayIntersection(plane, ray->mT);1310 const int cf = bRay.ComputeRayIntersection(plane, t); 1310 1311 1311 1312 switch (cf) … … 1323 1324 if (plane.Side(bRay.ExtrapOrigin()) <= 0) 1324 1325 { 1325 backRays.push_back(RayInfo(ray, bRay.GetMinT(), ray->mT));1326 frontRays.push_back(RayInfo(ray, ray->mT, bRay.GetMaxT()));1326 backRays.push_back(RayInfo(ray, bRay.GetMinT(), t)); 1327 frontRays.push_back(RayInfo(ray, t, bRay.GetMaxT())); 1327 1328 } 1328 1329 else 1329 1330 { 1330 frontRays.push_back(RayInfo(ray, bRay.GetMinT(), ray->mT));1331 backRays.push_back(RayInfo(ray, ray->mT, bRay.GetMaxT()));1331 frontRays.push_back(RayInfo(ray, bRay.GetMinT(), t)); 1332 backRays.push_back(RayInfo(ray, t, bRay.GetMaxT())); 1332 1333 } 1333 1334 break; -
trunk/VUT/GtpVisibilityPreprocessor/src/VspKdTree.cpp
r462 r463 716 716 717 717 // this is the main ray classification loop! 718 for(RayInfoContainer::iterator ri = leaf->mRays.begin(); 719 ri != leaf->mRays.end(); ++ ri) 720 { 721 if (!(*ri).mRay->IsActive()) 722 continue; 723 724 // determine the side of this ray with respect to the plane 725 int side = (*ri).ComputeRayIntersection(axis, position, (*ri).mRay->mT); 718 for(RayInfoContainer::iterator ri = leaf->mRays.begin(); 719 ri != leaf->mRays.end(); ++ ri) 720 { 721 if (!(*ri).mRay->IsActive()) 722 continue; 723 724 // determine the side of this ray with respect to the plane 725 float t; 726 int side = (*ri).ComputeRayIntersection(axis, position, t); 726 727 // (*ri).mRay->mSide = side; 727 728 … … 1089 1090 // first unref ray from the former leaf 1090 1091 (*ri).mRay->Unref(); 1091 1092 float t; 1092 1093 // determine the side of this ray with respect to the plane 1093 int side = node->ComputeRayIntersection(*ri, (*ri).mRay->mT);1094 int side = node->ComputeRayIntersection(*ri, t); 1094 1095 1095 1096 if (side == 0) … … 1099 1100 back->AddRay(RayInfo((*ri).mRay, 1100 1101 (*ri).mMinT, 1101 (*ri).mRay->mT));1102 t)); 1102 1103 front->AddRay(RayInfo((*ri).mRay, 1103 (*ri).mRay->mT,1104 t, 1104 1105 (*ri).mMaxT)); 1105 1106 } … … 1107 1108 { 1108 1109 back->AddRay(RayInfo((*ri).mRay, 1109 (*ri).mRay->mT,1110 t, 1110 1111 (*ri).mMaxT)); 1111 1112 front->AddRay(RayInfo((*ri).mRay, 1112 1113 (*ri).mMinT, 1113 (*ri).mRay->mT));1114 t)); 1114 1115 } 1115 1116 } … … 1397 1398 { 1398 1399 // determine the side of this ray with respect to the plane 1399 int side = in->ComputeRayIntersection(data.mRayData, data.mRayData.mRay->mT); 1400 float t; 1401 int side = in->ComputeRayIntersection(data.mRayData, t); 1400 1402 1401 1403 if (side == 0) … … 1404 1406 { 1405 1407 tstack.push(RayTraversalData(in->GetBack(), 1406 RayInfo(data.mRayData.mRay, data.mRayData.mMinT, data.mRayData.mRay->mT)));1408 RayInfo(data.mRayData.mRay, data.mRayData.mMinT, t))); 1407 1409 1408 1410 tstack.push(RayTraversalData(in->GetFront(), 1409 RayInfo(data.mRayData.mRay, data.mRayData.mRay->mT, data.mRayData.mMaxT)));1411 RayInfo(data.mRayData.mRay, t, data.mRayData.mMaxT))); 1410 1412 1411 1413 } … … 1414 1416 tstack.push(RayTraversalData(in->GetBack(), 1415 1417 RayInfo(data.mRayData.mRay, 1416 data.mRayData.mRay->mT,1418 t, 1417 1419 data.mRayData.mMaxT))); 1418 1420 tstack.push(RayTraversalData(in->GetFront(), 1419 1421 RayInfo(data.mRayData.mRay, 1420 1422 data.mRayData.mMinT, 1421 data.mRayData.mRay->mT)));1423 t))); 1422 1424 } 1423 1425 } -
trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.h
r448 r463 26 26 27 27 // computed t 28 float mT;28 // float mT; 29 29 30 30 // inverse of the ray size … … 56 56 mTerminationObject(terminationObject), 57 57 mRefCount(0), 58 mFlags(0) ,59 mT(1.0f)58 mFlags(0) 59 // mT(1.0f) 60 60 { 61 61 Precompute(); … … 66 66 mFlags(0), 67 67 mMailbox(-1), 68 mOriginObject(ray.sourceObject.mObject) ,69 mT(1.0f)68 mOriginObject(ray.sourceObject.mObject) 69 // mT(1.0f) 70 70 { 71 71 if (ray.sourceObject.mObject) -
trunk/VUT/GtpVisibilityPreprocessor/src/VssTree.cpp
r446 r463 597 597 ri++) 598 598 if ((*ri).mRay->IsActive()) { 599 599 float t; 600 600 // determine the side of this ray with respect to the plane 601 int side = (*ri).ComputeRayIntersection(axis, position, (*ri).mRay->mT);601 int side = (*ri).ComputeRayIntersection(axis, position, t); 602 602 // (*ri).mRay->mSide = side; 603 603 … … 1066 1066 // Debug << "computed t: " << (*ri).mRay->mT << endl; 1067 1067 // determine the side of this ray with respect to the plane 1068 int side = node->ComputeRayIntersection(*ri, (*ri).mRay->mT); 1068 float t; 1069 int side = node->ComputeRayIntersection(*ri, t); 1069 1070 1070 1071 if (side == 0) { … … 1072 1073 back->AddRay(VssTreeNode::RayInfo((*ri).mRay, 1073 1074 (*ri).mMinT, 1074 (*ri).mRay->mT)1075 t) 1075 1076 ); 1076 1077 front->AddRay(VssTreeNode::RayInfo((*ri).mRay, 1077 (*ri).mRay->mT,1078 t, 1078 1079 (*ri).mMaxT)); 1079 1080 } else { 1080 1081 back->AddRay(VssTreeNode::RayInfo((*ri).mRay, 1081 (*ri).mRay->mT,1082 t, 1082 1083 (*ri).mMaxT)); 1083 1084 front->AddRay(VssTreeNode::RayInfo((*ri).mRay, 1084 1085 (*ri).mMinT, 1085 (*ri).mRay->mT));1086 t)); 1086 1087 } 1087 1088 } else … … 1382 1383 1383 1384 if (in->axis <= VssTreeNode::SPLIT_Z) { 1384 1385 float t; 1385 1386 // determine the side of this ray with respect to the plane 1386 1387 int side = in->ComputeRayIntersection(data.rayData, 1387 data.rayData.mRay->mT);1388 t); 1388 1389 1389 1390 … … 1393 1394 VssTreeNode::RayInfo(data.rayData.mRay, 1394 1395 data.rayData.mMinT, 1395 data.rayData.mRay->mT))1396 t)) 1396 1397 ); 1397 1398 1398 1399 tstack.push(RayTraversalData(in->front, 1399 1400 VssTreeNode::RayInfo(data.rayData.mRay, 1400 data.rayData.mRay->mT,1401 t, 1401 1402 data.rayData.mMaxT 1402 1403 )) … … 1406 1407 tstack.push(RayTraversalData(in->back, 1407 1408 VssTreeNode::RayInfo(data.rayData.mRay, 1408 data.rayData.mRay->mT,1409 t, 1409 1410 data.rayData.mMaxT 1410 1411 )) … … 1414 1415 VssTreeNode::RayInfo(data.rayData.mRay, 1415 1416 data.rayData.mMinT, 1416 data.rayData.mRay->mT))1417 t)) 1417 1418 ); 1418 1419 -
trunk/VUT/GtpVisibilityPreprocessor/src/default.env
r459 r463 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 … … 39 39 maxDepth 40 40 40 minPvs 3 41 minRays 10041 minRays 200 42 42 minSize 0.001 43 43 maxCostRatio 2.0 … … 47 47 maxStaticMemory 100 48 48 49 splitType regular49 # splitType regular 50 50 # splitType heuristic 51 #splitType hybrid51 splitType hybrid 52 52 splitUseOnlyDrivingAxis true 53 53 … … 64 64 RssPreprocessor { 65 65 samplesPerPass 100000 66 initialSamples 100000067 vssSamples 100000068 vssSamplesPerPass 50000 66 initialSamples 500000 67 vssSamples 50000000 68 vssSamplesPerPass 500000 69 69 useImportanceSampling true 70 70 } -
trunk/VUT/GtpVisibilityPreprocessor/src/preprocessor.pro
r459 r463 1 2 1 TEMPLATE = app 3 2
Note: See TracChangeset
for help on using the changeset viewer.