Ignore:
Timestamp:
09/16/06 21:19:22 (18 years ago)
Author:
bittner
Message:

updates to make qt version running again

File:
1 edited

Legend:

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

    r1344 r1387  
    193193      float costRatio; 
    194194      bool mOnlyDrivingAxis = false; 
    195       if (mOnlyDrivingAxis) { 
     195 
     196          if (mOnlyDrivingAxis) { 
    196197                axis = box.Size().DrivingAxis(); 
    197198                costRatio = BestCostRatio(leaf, 
     
    485486{ 
    486487 
     488#define DEBUG_COST 0 
     489 
     490#if DEBUG_COST 
     491  static int nodeId = -1; 
     492  char filename[256]; 
     493   
     494  static int lastAxis = 100; 
     495  if (axis <= lastAxis) 
     496        nodeId++; 
     497 
     498  lastAxis = axis; 
     499   
     500  sprintf(filename, "sah-cost%d-%d.log", nodeId, axis); 
     501  ofstream costStream; 
     502   
     503  if (nodeId < 100) 
     504        costStream.open(filename); 
     505 
     506#endif 
     507   
    487508  SortSubdivisionCandidates(node, axis); 
    488509   
     
    543564      //      cout<<"pos="<<(*ci).value<<"\t q=("<<ql<<","<<qr<<")\t r=("<<rl<<","<<rr<<")"<<endl; 
    544565      //      cout<<"cost= "<<sum<<endl; 
    545        
     566 
     567#if DEBUG_COST 
     568  if (nodeId < 100) { 
     569        float oldCost = mSahUseFaces ? totalIntersections : node->mObjects.size(); 
     570        float newCost = mCt_div_ci + sum/boxArea; 
     571        float ratio = newCost/oldCost; 
     572        costStream<<(*ci).value<<" "<<ratio<<endl; 
     573  } 
     574#endif 
     575           
    546576      if (sum < minSum) { 
    547577                minSum = sum; 
Note: See TracChangeset for help on using the changeset viewer.