Ignore:
Timestamp:
01/08/06 05:56:40 (19 years ago)
Author:
mattausch
Message:

implemented view cells exporting / loading
improved vsp bsp tree (only axis aligbed until a level), reuse results from Plane
testing, collectmergeneighbors
implemented view cell meshes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp

    r503 r508  
    25272527 
    25282528 
     2529BspNodeGeometry::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 
    25292539BspNodeGeometry::~BspNodeGeometry() 
    25302540{ 
     
    25422552{ 
    25432553        PolygonContainer::const_iterator it, it_end = mPolys.end(); 
    2544         int vcount = 0; 
    2545  
     2554         
    25462555        for (it = mPolys.begin(); it != mPolys.end(); ++ it) 
    25472556        { 
    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); 
    25632558        } 
    25642559} 
Note: See TracChangeset for help on using the changeset viewer.