Ignore:
Timestamp:
02/05/06 11:03:17 (18 years ago)
Author:
mattausch
Message:

added cutting plane and enlarging view space

File:
1 edited

Legend:

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

    r589 r598  
    22732273        } 
    22742274} 
    2275 #if 0 
    2276 void VspKdTree::CollectMergeCandidates(const vector<VspKdRay *> &rays) 
    2277 { 
    2278         VspKdMergeCandidate::sOverallCost = 0; 
    2279  
    2280         vector<VspKdIntersection>::const_iterator iit; 
    2281         map<BspLeaf *, vector<BspLeaf*> candidateMap; 
    2282  
    2283         for (int i = 0; i < (int)rays.size(); ++ i) 
    2284         {   
    2285                 //VspKdLeaf::NewMail(); 
    2286                 VspKdRay *ray = rays[i]; 
    2287            
    2288                 // traverse leaves stored in the rays and compare and merge consecutive 
    2289                 // leaves (i.e., the neighbors in the tree) 
    2290                 if (ray->intersections.size() < 2) 
    2291                         continue; 
    2292            
    2293                 iit = ray->intersections.begin(); 
    2294  
    2295                 BspLeaf *previousLeaf = (*iit).mLeaf; 
    2296          
    2297                 ++ iit; 
    2298                  
    2299                 for (; iit != ray->intersections.end(); ++ iit) 
    2300                 { 
    2301             BspLeaf *leaf = (*iit).mLeaf; 
    2302                         leaf->Mail 
    2303                         // TODO: how to sort out doubles? 
    2304                         VspKdMergeCandidate mc = VspKdMergeCandidate(leaf, previousLeaf); 
    2305                         mMergeQueue.push(mc); 
    2306  
    2307                         VspKdMergeCandidate::sOverallCost += mc.GetLeaf1Cost(); 
    2308                         VspKdMergeCandidate::sOverallCost += mc.GetLeaf2Cost(); 
    2309  
    2310                         previousLeaf = leaf; 
    2311         } 
    2312         } 
    2313 } 
    2314 #endif 
     2275 
    23152276 
    23162277int VspKdTree::MergeViewCells(const VssRayContainer &rays) 
Note: See TracChangeset for help on using the changeset viewer.