Changeset 275 for trunk/VUT


Ignore:
Timestamp:
09/15/05 18:49:05 (19 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env

    r268 r275  
    6565#       splitPlaneStrategy leastSplits 
    6666#       splitPlaneStrategy balancedTree 
    67         splitPlaneStrategy nextPolygon 
    68 #       splitPlaneStrategy combined 
     67#       splitPlaneStrategy nextPolygon 
     68        splitPlaneStrategy combined 
    6969#       constructionMethod rays 
    7070        constructionMethod viewCells 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp

    r271 r275  
    149149                                                                int &splits, bool storePolys) 
    150150{ 
    151 //#ifdef _Debug 
    152         if (BspTree::displayDebug) 
    153         Debug << "Splitting polygons of node " << this << " with plane " << mPlane << endl; 
    154 //#endif 
     151#ifdef _Debug 
     152        //if (BspTree::displayDebug)Debug << "Splitting polygons of node " << this << " with plane " << mPlane << endl; 
     153#endif 
    155154        bool inside = false; 
    156155 
     
    160159                polys->pop_back(); 
    161160 
    162                 if (BspTree::displayDebug) Debug << "New polygon with plane: " << poly->GetSupportingPlane() << "\n"; 
     161                //if (BspTree::displayDebug) Debug << "New polygon with plane: " << poly->GetSupportingPlane() << "\n"; 
    163162 
    164163                // test if split is neccessary 
     
    175174                                        // same surface normal 
    176175                                        inside = (DotProd(mPlane.mNormal, poly->GetSupportingPlane().mNormal) > 0); 
    177                                         if (BspTree::displayDebug)       
    178                                 Debug << "coincident" << endl; 
     176                                        //if (BspTree::displayDebug)    Debug << "coincident" << endl; 
    179177                                // discard polygons or saves them in node 
    180178                                ProcessPolygon(poly, storePolys); 
    181179                                break; 
    182                         case Polygon3::FRONT_SIDE:      if (BspTree::displayDebug) 
    183                                 Debug << "front" << endl; 
     180                        case Polygon3::FRONT_SIDE:       
     181                                //if (BspTree::displayDebug)Debug << "front" << endl; 
    184182                                frontPolys->push_back(poly); 
    185183                                break; 
    186184                        case Polygon3::BACK_SIDE: 
    187                                 inside = true;  if (BspTree::displayDebug) 
    188                                 Debug << "back" << endl; 
     185                                inside = true;  //if (BspTree::displayDebug)Debug << "back" << endl; 
    189186                                backPolys->push_back(poly); 
    190187                                break; 
     
    201198                                backPolys->push_back(back_piece); 
    202199 
    203 //#ifdef _DEBUG 
     200#ifdef _DEBUG 
    204201                                if (BspTree::displayDebug)Debug << "split " << *poly << endl << *front_piece << endl << *back_piece << endl; 
    205 //#endif 
     202#endif 
    206203                                // save or discard polygons 
    207204                                ProcessPolygon(poly, storePolys); 
     
    213210                } 
    214211        } 
    215         if (BspTree::displayDebug) Debug << "inside: " << inside << endl; 
     212        //if (BspTree::displayDebug) Debug << "inside: " << inside << endl; 
    216213        // contains nothing 
    217214        delete polys; 
     
    262259mRoot(NULL),  
    263260mIsIncremential(false), 
    264 mStorePolys(true) 
     261//mStorePolys(true) 
     262mStorePolys(false) 
    265263{ 
    266264        Randomize(); // initialise random generator for heuristics 
     
    449447                Polygon3 *poly = new Polygon3((*fi), mesh); 
    450448                polys.push_back(poly); 
    451                 if (displayDebug) 
    452                         Debug << *poly << endl; 
     449                //if (displayDebug)Debug << *poly << endl; 
    453450                polysNum ++; 
    454451        } 
     
    461458   
    462459        for (int i = 0; i < limit; ++i) 
    463         {if((i == 12) || (i == 14)) 
     460        {//if ((i == 12) ||(i==14)) 
    464461                if (viewCells[i]->GetMesh()) // copy the mesh data to polygons 
    465462                { 
     
    519516        // view cells are inserted one after another =>  
    520517        // global tree optimization possible 
    521         if (!mIsIncremential) 
     518        if (!mIsIncremential) // todo: not incremential does not work 
    522519        { 
    523520                // copy view cell meshes into one big polygon soup 
     
    542539 
    543540        long startTime = GetTime(); 
    544 displayDebug = true; 
     541//displayDebug = true; 
    545542        counter = 0; 
    546543        Debug << "**** Starting view cell insertion ****" << endl; 
    547544        for (it = viewCells.begin(); it != viewCells.end(); ++ it) 
    548545        { 
    549                 if ((counter == 12) || (counter == 14)) 
    550                 {Debug << "** inserting view cell " << counter << " **" << endl; 
    551                 InsertViewCell(*it);} 
    552                 counter ++; 
     546                //if ((counter == 12) || (counter == 14)){ 
     547                //Debug << "** inserting view cell " << counter << " **" << endl; 
     548                InsertViewCell(*it); 
     549        //}     counter ++; 
    553550        } 
    554551 
     
    621618                //&& !(viewCell && tData.mIsInside && dynamic_cast<BspLeaf *>(tData.mNode)->GetViewCell()))   
    622619        { 
    623 //#ifdef _DEBUG 
    624                 if (displayDebug) 
    625                         Debug << "subdivision terminated at depth " << tData.mDepth << ", #polys: " << (int)tData.mPolygons->size() << endl; 
    626 //#endif 
     620#ifdef _DEBUG 
     621                if (displayDebug)Debug << "subdivision terminated at depth " << tData.mDepth << ", #polys: " << (int)tData.mPolygons->size() << endl; 
     622#endif 
    627623 
    628624                EvaluateLeafStats(tData); 
     
    634630 
    635631                        if (leaf->GetViewCell()) 
    636                                 Debug << "ERROR: leaf already has view cell " << leaf->mViewCellIdx << endl; 
    637  
    638                         leaf->mViewCellIdx = counter; 
    639                         Debug << "insert view cell" << endl; 
     632                                Debug << "ERROR: leaf already has view cell " << endl;//leaf->mViewCellIdx << endl; 
     633 
     634                        //leaf->mViewCellIdx = counter; 
     635                        //Debug << "insert view cell" << endl; 
    640636                        leaf->SetViewCell(viewCell); 
    641637                } 
  • trunk/VUT/GtpVisibilityPreprocessor/src/main.cpp

    r265 r275  
    4545          p->LoadViewCells(vcFilename); 
    4646                   
    47                   /*Exporter *exporter = Exporter::GetExporter("viewcells.x3d"); 
     47                  Exporter *exporter = Exporter::GetExporter("viewcells.x3d"); 
    4848                  if (exporter)  
    4949                  {       exporter->ExportViewCells(&p->mViewCells); 
    5050                          delete exporter;   
    51                   }*/ 
     51                  } 
    5252          } 
    5353          else 
Note: See TracChangeset for help on using the changeset viewer.