Ignore:
Timestamp:
02/16/06 10:30:24 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp

    r645 r646  
    331331                        case Polygon3::COINCIDENT: 
    332332                                coincident.push_back(poly); 
     333                                Debug << "!!!Coincident: " << poly->GetSupportingPlane() << endl; 
    333334                                break;                   
    334335                        case Polygon3::FRONT_SIDE:       
    335336                                frontPolys.push_back(poly); 
     337                                Debug << "!!!front: " << poly->GetSupportingPlane() << endl; 
    336338                                break; 
    337339                        case Polygon3::BACK_SIDE: 
     340                                Debug << "!!!back: " << poly->GetSupportingPlane() << endl; 
    338341                                backPolys.push_back(poly); 
    339342                                break; 
     
    984987                Debug << "cost ratio: " << (cFront + cBack) / cData << endl; 
    985988 
    986                 if ((cFront + cBack) / cData > 1) 
     989                if (((cFront + cBack) / cData > 1) || (tFrontData.mProbability == 0) || (tBackData.mProbability == 0)) 
     990                { 
    987991                        Debug << "ERROR!!" << endl; 
     992 
     993                        vector<Plane3> halfSpaces; 
     994                        ExtractHalfSpaces(interior, halfSpaces); 
     995         
     996                        for (int i = 0; i < (int)halfSpaces.size(); ++ i) 
     997                                Debug << halfSpaces[i] << endl; 
     998 
     999                        Debug << "geom:\n" << *tData.mGeometry << endl; 
     1000                        Debug << "fgeom:\n" << *tFrontData.mGeometry << endl; 
     1001                        Debug << "bgeom:\n" << *tBackData.mGeometry << endl; 
     1002                } 
    9881003 
    9891004                float costDecr = (cFront + cBack - cData) / mBox.GetVolume(); 
     
    10731088         
    10741089         
    1075 #ifdef _DEBUG 
     1090//#ifdef _DEBUG 
    10761091        Debug << interior << endl; 
    1077 #endif 
     1092        Debug << interior->GetPlane() << endl; 
     1093//#endif 
    10781094         
    10791095 
     
    11031119                                                                           interior->mPlane, 
    11041120                                                                           mBox, 
    1105                                                                            0.000000000001); 
    1106                                                                            //mEpsilon); 
     1121                                                                           //0.000000000001); 
     1122                                                                           mEpsilon); 
    11071123         
    11081124                 
     
    12981314Plane3 BspTree::SelectPlane(BspLeaf *leaf, BspTraversalData &data) 
    12991315{ 
    1300         if (data.mPolygons->empty() && data.mRays->empty()) 
     1316        if ((!mMaxPolyCandidates || data.mPolygons->empty()) &&  
     1317                (!mMaxRayCandidates || data.mRays->empty())) 
    13011318        { 
    13021319                Debug << "Warning: No autopartition polygon candidate available\n"; 
     
    14891506        Debug << "plane lowest cost: " << lowestCost << endl; 
    14901507#endif 
     1508        Debug << "choosen plane: " << bestPlane << endl; 
    14911509 
    14921510        return bestPlane; 
Note: See TracChangeset for help on using the changeset viewer.