Changeset 646


Ignore:
Timestamp:
02/16/06 10:30:24 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/default.env

    r645 r646  
    414414        Termination { 
    415415                # parameters used for autopartition 
    416                 minRays 10 
    417                 minPolygons -1 
     416                minRays -1 
     417                minPolygons 1 
    418418                maxDepth 30 
    419419                minPvs -1 
    420                 minProbability 0.001 
     420                minProbability 0.00001 
    421421                maxRayContribution 9999 
    422                 maxViewCells    1000 
     422                maxViewCells    5000 
    423423 
    424424                # used for pvs criterium 
  • 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; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.h

    r611 r646  
    7272        */ 
    7373        PolygonContainer mPolys; 
     74 
     75        friend ostream &operator<<(ostream &s, const BspNodeGeometry &a) 
     76        { 
     77                PolygonContainer::const_iterator it, it_end = a.mPolys.end(); 
     78 
     79                for (it = a.mPolys.begin(); it != it_end; ++ it) 
     80                        s << *(*it) << endl; 
     81                return s << endl; 
     82        } 
     83 
    7484}; 
    7585 
     
    275285/** BSP interior node implementation  
    276286*/ 
    277 class BspInterior : public BspNode  
     287class BspInterior: public BspNode  
    278288{ 
    279289        friend class BspTree; 
Note: See TracChangeset for help on using the changeset viewer.