Changeset 450 for trunk/VUT/GtpVisibilityPreprocessor
- Timestamp:
- 12/05/05 10:03:20 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Makefile
r446 r450 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (1.07a) (Qt 3.3.2) on: Sun Dec 04 20:05:5120053 # Generated by qmake (1.07a) (Qt 3.3.2) on: Mon Dec 05 09:51:45 2005 4 4 # Project: preprocessor.pro 5 5 # Template: app … … 80 80 RayInfo.cpp \ 81 81 RssTree.cpp \ 82 RssPreprocessor.cpp 82 RssPreprocessor.cpp \ 83 ViewCellsManager.cpp \ 84 VspBspTree.cpp 83 85 OBJECTS = Preprocessor.obj \ 84 86 SamplingPreprocessor.obj \ … … 118 120 RayInfo.obj \ 119 121 RssTree.obj \ 120 RssPreprocessor.obj 122 RssPreprocessor.obj \ 123 ViewCellsManager.obj \ 124 VspBspTree.obj 121 125 FORMS = 122 126 UICDECLS = … … 218 222 -$(DEL_FILE) RssTree.obj 219 223 -$(DEL_FILE) RssPreprocessor.obj 224 -$(DEL_FILE) ViewCellsManager.obj 225 -$(DEL_FILE) VspBspTree.obj 220 226 -$(DEL_FILE) preprocessor.pdb 221 227 -$(DEL_FILE) preprocessor.ilk … … 241 247 ViewCell.h \ 242 248 Environment.h \ 243 RenderSimulator.h \ 249 ViewCellsManager.h \ 250 ViewCellBsp.h \ 251 VspBspTree.h \ 252 VspKdTree.h \ 244 253 Containers.h \ 245 254 AxisAlignedBox3.h \ … … 255 264 Mesh.h \ 256 265 KdTree.h \ 257 ViewCellBsp.h \258 VspKdTree.h \259 266 Intersectable.h \ 260 267 Pvs.h \ … … 273 280 Polygon3.h \ 274 281 ViewCell.h \ 282 ViewCellsManager.h \ 275 283 RenderSimulator.h \ 276 284 Containers.h \ … … 286 294 VssRay.h \ 287 295 Mesh.h \ 288 ViewCellBsp.h \ 289 VspKdTree.h \ 290 Intersectable.h \ 291 Material.h \ 292 Statistics.h \ 293 RayInfo.h \ 294 Exporter.h \ 296 Intersectable.h \ 297 Material.h \ 298 Exporter.h \ 299 Statistics.h \ 295 300 296 301 … … 301 306 Mesh.h \ 302 307 KdTree.h \ 303 ViewCellBsp.h \ 304 ViewCell.h \ 305 VspKdTree.h \ 306 Intersectable.h \ 307 Plane3.h \ 308 Matrix4x4.h \ 309 AxisAlignedBox3.h \ 310 Material.h \ 311 Pvs.h \ 312 Rectangle3.h \ 313 Vector3.h \ 314 common.h \ 315 Ray.h \ 316 Polygon3.h \ 317 Statistics.h \ 318 VssRay.h \ 319 RayInfo.h \ 308 Intersectable.h \ 309 Plane3.h \ 310 Matrix4x4.h \ 311 AxisAlignedBox3.h \ 312 Material.h \ 313 Pvs.h \ 314 Rectangle3.h \ 315 Vector3.h \ 316 common.h \ 317 Ray.h \ 320 318 321 319 … … 479 477 Mesh.h \ 480 478 KdTree.h \ 481 ViewCellBsp.h \ 482 VspKdTree.h \ 483 Intersectable.h \ 484 Plane3.h \ 485 Matrix4x4.h \ 486 AxisAlignedBox3.h \ 487 Material.h \ 488 Pvs.h \ 489 Rectangle3.h \ 490 Vector3.h \ 491 common.h \ 492 Ray.h \ 493 Polygon3.h \ 494 Statistics.h \ 495 RayInfo.h \ 479 Intersectable.h \ 480 Plane3.h \ 481 Matrix4x4.h \ 482 AxisAlignedBox3.h \ 483 Material.h \ 484 Pvs.h \ 485 Rectangle3.h \ 486 Vector3.h \ 487 common.h \ 488 Ray.h \ 496 489 497 490 … … 550 543 SceneGraph.h \ 551 544 Triangle3.h \ 552 ViewCell .h \545 ViewCellsManager.h \ 553 546 Parser.h \ 554 547 Containers.h \ … … 563 556 common.h \ 564 557 Ray.h \ 558 VssRay.h \ 565 559 566 560 … … 726 720 VssRay.h \ 727 721 VssTree.h \ 722 ViewCellsManager.h \ 728 723 Containers.h \ 729 724 AxisAlignedBox3.h \ … … 737 732 Preprocessor.h \ 738 733 Mesh.h \ 739 ViewCellBsp.h \ 740 VspKdTree.h \ 741 Intersectable.h \ 742 Material.h \ 743 Statistics.h \ 744 RayInfo.h \ 745 Exporter.h \ 734 Intersectable.h \ 735 Material.h \ 736 Exporter.h \ 737 Statistics.h \ 746 738 747 739 … … 834 826 Preprocessor.h \ 835 827 Mesh.h \ 828 Intersectable.h \ 829 Material.h \ 830 Exporter.h \ 831 Statistics.h \ 832 833 834 ViewCellsManager.obj: ViewCellsManager.cpp \ 835 ViewCellsManager.h \ 836 RenderSimulator.h \ 837 Mesh.h \ 838 Triangle3.h \ 839 ViewCell.h \ 840 Environment.h \ 841 X3dParser.h \ 836 842 ViewCellBsp.h \ 843 KdTree.h \ 837 844 VspKdTree.h \ 838 Intersectable.h \ 839 Material.h \ 840 Statistics.h \ 845 Exporter.h \ 846 VspBspTree.h \ 847 Ray.h \ 848 VssRay.h \ 849 Containers.h \ 850 Matrix4x4.h \ 851 Vector3.h \ 852 common.h \ 853 Statistics.h \ 854 Intersectable.h \ 855 Plane3.h \ 856 AxisAlignedBox3.h \ 857 Material.h \ 858 Pvs.h \ 859 Rectangle3.h \ 860 Parser.h \ 861 Polygon3.h \ 841 862 RayInfo.h \ 842 Exporter.h \ 863 864 865 VspBspTree.obj: VspBspTree.cpp \ 866 Plane3.h \ 867 VspBspTree.h \ 868 Mesh.h \ 869 common.h \ 870 ViewCell.h \ 871 Environment.h \ 872 Polygon3.h \ 873 Ray.h \ 874 AxisAlignedBox3.h \ 875 Exporter.h \ 876 Vector3.h \ 877 Containers.h \ 878 Statistics.h \ 879 VssRay.h \ 880 RayInfo.h \ 881 Intersectable.h \ 882 Matrix4x4.h \ 883 Material.h \ 884 Pvs.h \ 885 Rectangle3.h \ 843 886 844 887 -
trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp
r448 r450 572 572 delete rssTree; 573 573 574 575 574 return true; 576 575 } -
trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.h
r447 r450 98 98 ); 99 99 100 void CastRay(const BspTree &tree, const VssRay & vssRay);101 102 int AddObjectSamples(Intersectable *obj, const Ray &ray);103 100 104 101 void … … 106 103 RssTree *rssTree 107 104 ); 105 106 void 107 CastRay(const BspTree &tree, const VssRay & vssRay); 108 109 int 110 AddObjectSamples(Intersectable *obj, const Ray &ray); 111 112 108 113 109 114 }; -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r448 r450 818 818 819 819 #ifdef _DEBUG 820 if (frontPolys->empty() && backPolys->empty() && (coincident.size() > 2))821 { for (PolygonContainer::iterator it = coincident.begin(); it != coincident.end(); ++it)822 Debug << (*it) << " " << (*it)->GetArea() << " " << (*it)->mParent << endl ;823 Debug << endl;}820 // if (frontPolys->empty() && backPolys->empty() && (coincident.size() > 2)) 821 // { for (PolygonContainer::iterator it = coincident.begin(); it != coincident.end(); ++it) 822 // Debug << (*it) << " " << (*it)->GetArea() << " " << (*it)->mParent << endl ; 823 // Debug << endl;} 824 824 #endif 825 825 -
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp
r448 r450 365 365 366 366 #ifdef _DEBUG 367 if (frontPolys->empty() && backPolys->empty() && (coincident.size() > 2))368 { for (PolygonContainer::iterator it = coincident.begin(); it != coincident.end(); ++it)369 Debug << (*it) << " " << (*it)->GetArea() << " " << (*it)->mParent << endl ;370 Debug << endl;}367 // if (frontPolys->empty() && backPolys->empty() && (coincident.size() > 2)) 368 // { for (PolygonContainer::iterator it = coincident.begin(); it != coincident.end(); ++it) 369 // Debug << (*it) << " " << (*it)->GetArea() << " " << (*it)->mParent << endl ; 370 // Debug << endl;} 371 371 #endif 372 372 … … 953 953 954 954 #ifdef _DEBUG 955 Debug << "totalpvs: " << pvs << " ptotal: " << pOverall956 << " frontpvs: " << frontPvs << " pFront: " << pFront957 << " backpvs: " << backPvs << " pBack: " << pBack << endl << endl;955 // Debug << "totalpvs: " << pvs << " ptotal: " << pOverall 956 // << " frontpvs: " << frontPvs << " pFront: " << pFront 957 // << " backpvs: " << backPvs << " pBack: " << pBack << endl << endl; 958 958 #endif 959 959 return val; -
trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp
r449 r450 12 12 #include "VssTree.h" 13 13 #include "VspBspTree.h" 14 #include "RssTree.h" 14 15 15 16 … … 1220 1221 } 1221 1222 } 1223 1224 1225 bool 1226 X3dExporter::ExportRssTree2(const RssTree &tree, 1227 const Vector3 direction 1228 ) 1229 { 1230 stack<RssTreeNode *> tStack; 1231 1232 1233 mUseForcedMaterial = true; 1234 1235 Vector3 dirParam; 1236 1237 dirParam.x = VssRay::GetDirParam(0, Normalize(direction)); 1238 dirParam.y = VssRay::GetDirParam(1, Normalize(direction)); 1239 1240 float maxImportance = 0.0f; 1241 tStack.push(tree.GetRoot()); 1242 while (!tStack.empty()) { 1243 1244 RssTreeNode *node = tStack.top(); 1245 tStack.pop(); 1246 1247 if (!node->IsLeaf()) { 1248 RssTreeInterior *interior = (RssTreeInterior *)node; 1249 if (interior->axis < 3) { 1250 tStack.push(interior->front); 1251 tStack.push(interior->back); 1252 } else { 1253 if (dirParam[interior->axis-3] < interior->position) 1254 tStack.push(interior->back); 1255 else 1256 tStack.push(interior->front); 1257 } 1258 } else { 1259 RssTreeLeaf *leaf = (RssTreeLeaf *)node; 1260 if (tree.ValidLeaf(leaf)) { 1261 float i = leaf->GetImportance(); 1262 if (i > maxImportance) 1263 maxImportance = i; 1264 } 1265 } 1266 } 1267 1268 tStack.push(tree.GetRoot()); 1269 while (!tStack.empty()) { 1270 1271 RssTreeNode *node = tStack.top(); 1272 tStack.pop(); 1273 1274 1275 if (!node->IsLeaf()) { 1276 RssTreeInterior *interior = (RssTreeInterior *)node; 1277 if (interior->axis < 3) { 1278 tStack.push(interior->front); 1279 tStack.push(interior->back); 1280 } else { 1281 if (dirParam[interior->axis-3] < interior->position) 1282 tStack.push(interior->back); 1283 else 1284 tStack.push(interior->front); 1285 } 1286 } else { 1287 RssTreeLeaf *leaf = (RssTreeLeaf *)node; 1288 if (tree.ValidLeaf(leaf)) { 1289 AxisAlignedBox3 box; 1290 box = tree.GetShrankedBBox(leaf); 1291 Mesh *mesh = new Mesh; 1292 AddBoxToMesh(box, mesh); 1293 1294 // get 4 corners of the ray directions 1295 1296 mForcedMaterial.mDiffuseColor.b = 1.0f; 1297 mForcedMaterial.mDiffuseColor.r = leaf->GetImportance()/maxImportance; 1298 mForcedMaterial.mDiffuseColor.g = 1.0f - mForcedMaterial.mDiffuseColor.r; 1299 1300 ExportMesh(mesh); 1301 delete mesh; 1302 } 1303 } 1304 } 1305 1306 mUseForcedMaterial = false; 1307 1308 return true; 1309 } -
trunk/VUT/GtpVisibilityPreprocessor/src/main.cpp
r448 r450 58 58 p->KdTreeStatistics(cout); 59 59 60 60 61 // parse view cells related options 61 62 p->PrepareViewCells(); -
trunk/VUT/GtpVisibilityPreprocessor/src/preprocessor.pro
r446 r450 39 39 MutualVisibility.cpp Triangle3.cpp Rectangle3.cpp Plane3.cpp Polygon3.cpp \ 40 40 ViewCell.cpp ViewCellBsp.cpp Halton.cpp VssRay.cpp VssTree.cpp VssPreprocessor.cpp \ 41 RenderSimulator.cpp VspKdTree.cpp RayInfo.cpp RssTree.cpp RssPreprocessor.cpp 41 RenderSimulator.cpp VspKdTree.cpp RayInfo.cpp RssTree.cpp RssPreprocessor.cpp \ 42 ViewCellsManager.cpp VspBspTree.cpp 42 43
Note: See TracChangeset
for help on using the changeset viewer.