- Timestamp:
- 02/09/06 01:18:31 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp
r607 r609 699 699 int axis = 0; 700 700 701 const float factor = 0. 35;701 const float factor = 0.65; 702 702 Vector3 point = mViewSpaceBox.Min() + mViewSpaceBox.Size() * factor; 703 703 … … 2613 2613 2614 2614 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) 2615 bool VspBspViewCellsManager::EqualToSpatialNode(ViewCell *viewCell) const 2616 { 2617 return GetSpatialNode(viewCell) != NULL; 2618 } 2619 2620 2621 BspNode *VspBspViewCellsManager::GetSpatialNode(ViewCell *viewCell) const 2623 2622 { 2624 2623 if (!viewCell->IsLeaf()) … … 2626 2625 BspViewCell *bspVc = dynamic_cast<BspViewCell *>(viewCell); 2627 2626 2628 *node = bspVc->mLeaf; 2629 return true; 2630 } 2627 return bspVc->mLeaf; 2628 } 2631 2629 else 2632 2630 { … … 2635 2633 // cannot be node of binary tree 2636 2634 if (interior->mChildren.size() != 2) 2637 return false;2635 return NULL; 2638 2636 2639 2637 ViewCell *left = interior->mChildren[0]; 2640 2638 ViewCell *right = interior->mChildren[1]; 2641 2639 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; 2655 2650 } 2656 2651 … … 2691 2686 2692 2687 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) 2694 2690 if (mViewCellsFinished) 2695 2691 { … … 2790 2786 { 2791 2787 return VSP_BSP; 2788 } 2789 2790 2791 void VspBspViewCellsManager::CreateMergeHierarchy() 2792 { 2793 2792 2794 } 2793 2795
Note: See TracChangeset
for help on using the changeset viewer.