Changeset 508 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
- Timestamp:
- 01/08/06 05:56:40 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r503 r508 2527 2527 2528 2528 2529 BspNodeGeometry::BspNodeGeometry(const BspNodeGeometry &rhs) 2530 { 2531 PolygonContainer::const_iterator it, it_end = rhs.mPolys.end(); 2532 for (it = rhs.mPolys.begin(); it != it_end; ++ it) 2533 { 2534 Polygon3 *poly = *it; 2535 mPolys.push_back(new Polygon3(*poly)); 2536 } 2537 } 2538 2529 2539 BspNodeGeometry::~BspNodeGeometry() 2530 2540 { … … 2542 2552 { 2543 2553 PolygonContainer::const_iterator it, it_end = mPolys.end(); 2544 int vcount = 0; 2545 2554 2546 2555 for (it = mPolys.begin(); it != mPolys.end(); ++ it) 2547 2556 { 2548 Polygon3 *poly = *it; 2549 2550 vector<Triangle3> triangles; 2551 poly->Triangulate(triangles); 2552 vector<Triangle3>::const_iterator tit, tit_end = triangles.end(); 2553 2554 for (tit = triangles.begin(); tit != tit_end; ++ tit) 2555 { 2556 mesh.mVertices.push_back((*tit).mVertices[0]); 2557 mesh.mVertices.push_back((*tit).mVertices[1]); 2558 mesh.mVertices.push_back((*tit).mVertices[2]); 2559 2560 Face *face = new Face(vcount ++, vcount ++, vcount ++); 2561 mesh.AddFace(face); 2562 } 2557 (*it)->AddToMesh(mesh); 2563 2558 } 2564 2559 }
Note: See TracChangeset
for help on using the changeset viewer.