Ignore:
Timestamp:
10/09/06 15:57:28 (18 years ago)
Author:
mattausch
Message:

resolved bug for object space distribution using triangles
fixed biasing bug for mesh::GetRandomSurfacePoint? method and
GetRandomVisibleSurfacePoint?.

File:
1 edited

Legend:

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

    r1486 r1586  
    2323        We eliminate already accounted kd nodes and objects using mailboxing.  
    2424*/ 
    25 static int CountNewObjectsInKdNode(KdIntersectable *kdobj) 
     25static int EvalKdNodeContribution(KdIntersectable *kdobj) 
    2626{ 
    2727        int pvs = 0; 
     
    7676 
    7777 
    78 /** the pvs is the number of different objects in the node leaves 
     78/** Returns the the number of different objects in the leaves of the node. 
    7979        We eliminate already accounted kd nodes and objects using mailboxing.  
    8080*/ 
    81 static int CountNewObjectsInBvhNode(BvhIntersectable *bvhobj) 
     81static int EvalBvhNodeContribution(BvhIntersectable *bvhobj) 
    8282{ 
    8383        BvhNode *node= bvhobj->GetItem(); 
     
    113113                        { 
    114114                                BvhLeaf *leaf = dynamic_cast<BvhLeaf *>(node); 
    115                         
     115 
    116116                                // add #objects exclusivly in this node 
    117117                                pvs += (int)leaf->mObjects.size(); 
     
    126126                } 
    127127        } 
     128 
    128129        return pvs; 
    129130} 
     
    151152                                        // found kd node 
    152153                                        KdIntersectable *kdObj = dynamic_cast<KdIntersectable *>(obj); 
    153                                         pvs += CountNewObjectsInKdNode(kdObj);   
     154                                        pvs += EvalKdNodeContribution(kdObj);    
    154155                                        break; 
    155156                                } 
     
    157158                                { 
    158159                                        BvhIntersectable *bvhObj = dynamic_cast<BvhIntersectable *>(obj); 
    159                                         pvs += CountNewObjectsInBvhNode(bvhObj); 
     160                                        pvs += EvalBvhNodeContribution(bvhObj); 
    160161                                        break; 
    161162                                } 
Note: See TracChangeset for help on using the changeset viewer.