Changeset 425 for trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp
- Timestamp:
- 11/21/05 18:51:12 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp
r422 r425 583 583 } 584 584 585 bool X3dExporter::ExportVspKdTree(const VspKdTree &tree )586 { 587 / *if (mExportRayDensity) {588 return ExportKdTreeRayDensity(tree); }*/585 bool X3dExporter::ExportVspKdTree(const VspKdTree &tree, const int maxPvs) 586 { 587 //if (mExportRayDensity) { 588 //return ExportKdTreeRayDensity(tree); } 589 589 590 590 stack<VspKdTreeNode *> tStack; … … 592 592 tStack.push(tree.GetRoot()); 593 593 594 Mesh *mesh = new Mesh; 595 594 //Mesh *mesh = new Mesh; 595 596 if (maxPvs > 0) 597 mUseForcedMaterial = true; 598 596 599 while (!tStack.empty()) 597 600 { … … 601 604 AxisAlignedBox3 box = tree.GetBBox(node); 602 605 606 Mesh *mesh = new Mesh; 607 603 608 // add 6 vertices of the box 604 609 int index = (int)mesh->mVertices.size(); 605 610 606 611 for (int i=0; i < 8; ++ i) 607 612 { … … 619 624 mesh->AddFace(new Face(index + 2, index + 3, index + 7, index + 6) ); 620 625 626 if (maxPvs > 0) 627 { 628 mForcedMaterial.mDiffuseColor.b = 1.0f; 629 const float importance = maxPvs; 630 //float importance = (float)(*it)->GetPvs().GetSize() / (float)maxPvs; 631 632 mForcedMaterial.mDiffuseColor.r = importance; 633 mForcedMaterial.mDiffuseColor.g = 1.0f - mForcedMaterial.mDiffuseColor.r; 634 } 635 636 ExportMesh(mesh); 637 DEL_PTR(mesh); 638 621 639 if (!node->IsLeaf()) 622 640 { … … 627 645 } 628 646 629 ExportMesh(mesh);630 DEL_PTR(mesh);647 //ExportMesh(mesh); 648 //DEL_PTR(mesh); 631 649 632 650 return true;
Note: See TracChangeset
for help on using the changeset viewer.