Ignore:
Timestamp:
02/09/06 01:18:31 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r607 r609  
    699699        int axis = 0; 
    700700 
    701         const float factor = 0.35; 
     701        const float factor = 0.65; 
    702702        Vector3 point = mViewSpaceBox.Min() +  mViewSpaceBox.Size() * factor; 
    703703 
     
    26132613 
    26142614 
    2615 bool VspBspViewCellsManager::EqualToSpatialNode(ViewCell *viewCell) 
    2616 { 
    2617         BspNode *node; 
    2618         return EqualToSpatialNode(viewCell, &node); 
    2619 } 
    2620  
    2621  
    2622 bool VspBspViewCellsManager::EqualToSpatialNode(ViewCell *viewCell, BspNode **node) 
     2615bool VspBspViewCellsManager::EqualToSpatialNode(ViewCell *viewCell) const 
     2616{ 
     2617        return GetSpatialNode(viewCell) != NULL; 
     2618} 
     2619 
     2620 
     2621BspNode *VspBspViewCellsManager::GetSpatialNode(ViewCell *viewCell) const 
    26232622{ 
    26242623        if (!viewCell->IsLeaf()) 
     
    26262625                BspViewCell *bspVc = dynamic_cast<BspViewCell *>(viewCell); 
    26272626 
    2628                 *node = bspVc->mLeaf; 
    2629         return true; 
    2630         } 
     2627                return bspVc->mLeaf; 
     2628        } 
    26312629        else 
    26322630        { 
     
    26352633                // cannot be node of binary tree 
    26362634                if (interior->mChildren.size() != 2) 
    2637                         return false; 
     2635                        return NULL; 
    26382636 
    26392637                ViewCell *left = interior->mChildren[0]; 
    26402638                ViewCell *right = interior->mChildren[1]; 
    26412639 
    2642                 BspNode *leftNode; 
    2643                 BspNode *rightNode; 
    2644  
    2645                 if (EqualToSpatialNode(left, &leftNode) && EqualToSpatialNode(right, &rightNode)) 
    2646                 { 
    2647                         *node = leftNode->GetParent(); 
    2648                         return leftNode->IsSibling(rightNode);   
    2649                 } 
    2650  
    2651                 *node = NULL; 
    2652  
    2653                 return false; 
    2654         } 
     2640                BspNode *leftNode = GetSpatialNode(left); 
     2641                BspNode *rightNode = GetSpatialNode(right); 
     2642 
     2643                if (leftNode && rightNode && leftNode->IsSibling(rightNode)) 
     2644                { 
     2645                        return leftNode->GetParent();  
     2646                } 
     2647        } 
     2648 
     2649        return NULL; 
    26552650} 
    26562651 
     
    26912686 
    26922687 
    2693         // view cells already finished before post processing step (i.e. because they were loaded) 
     2688        // view cells already finished before post processing step  
     2689        // (i.e. because they were loaded) 
    26942690        if (mViewCellsFinished) 
    26952691        { 
     
    27902786{ 
    27912787        return VSP_BSP; 
     2788} 
     2789 
     2790 
     2791void VspBspViewCellsManager::CreateMergeHierarchy() 
     2792{ 
     2793         
    27922794} 
    27932795 
Note: See TracChangeset for help on using the changeset viewer.