Changeset 360 for trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp
- Timestamp:
- 10/28/05 18:13:22 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp
r349 r360 687 687 }; 688 688 689 void X3dExporter::ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves) 690 { 691 vector<BspLeaf *>::const_iterator it, it_end = leaves.end(); 692 693 for (it = leaves.begin(); it != it_end; ++ it) 694 { 695 PolygonContainer cell; 696 tree.ConstructGeometry(*it, cell); 697 698 ExportPolygons(cell); 699 700 CLEAR_CONTAINER(cell); 701 } 702 } 703 689 704 void X3dExporter::ExportBspSplits(const BspTree &tree) 690 705 { … … 705 720 { 706 721 BspInterior *interior = dynamic_cast<BspInterior *>(tData.mNode); 722 707 723 if (tData.mNode != tree.GetRoot()) 708 tData.mSides.push_back(tData.mIsFront); // add current side 724 tData.mSides.push_back(tData.mIsFront); // add current side of split plane 709 725 710 726 // bounded plane is added to the polygons … … 712 728 713 729 // do all the splits with the previous planes 714 for (int i = 0; i < (int)tData.mPlanes.size(); ++ i)730 for (int i = 0; i < (int)tData.mPlanes.size(); ++ i) 715 731 { 716 732 VertexContainer splitPts; 717 Polygon3 *frontPoly = new Polygon3(); 718 Polygon3 *backPoly = new Polygon3(); 719 733 720 734 if (planePoly->ClassifyPlane(*tData.mPlanes[i]) == Polygon3::SPLIT) 721 735 { 736 Polygon3 *frontPoly = new Polygon3(); 737 Polygon3 *backPoly = new Polygon3(); 738 722 739 planePoly->Split(*tData.mPlanes[i], *frontPoly, *backPoly, splitPts); 723 740 DEL_PTR(planePoly); … … 741 758 polys.push_back(planePoly); 742 759 else 743 {744 //Debug << "polygon not valid: " << *planePoly << " size: " << (int)planePoly->mVertices.size() << endl;745 760 DEL_PTR(planePoly); 746 }761 747 762 // push the children on the stack 748 763 tStack.push(BspSplitData(interior->GetFront(), tData.mPlanes, tData.mSides, true));
Note: See TracChangeset
for help on using the changeset viewer.