- Timestamp:
- 02/08/06 18:25:17 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp
r605 r607 113 113 114 114 115 115 116 /// helper function which destroys rays or copies them into the output ray container 116 117 inline void addOutRays(VssRayContainer &rays, VssRayContainer *outRays) … … 2612 2613 2613 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) 2623 { 2624 if (!viewCell->IsLeaf()) 2625 { 2626 BspViewCell *bspVc = dynamic_cast<BspViewCell *>(viewCell); 2627 2628 *node = bspVc->mLeaf; 2629 return true; 2630 } 2631 else 2632 { 2633 ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(viewCell); 2634 2635 // cannot be node of binary tree 2636 if (interior->mChildren.size() != 2) 2637 return false; 2638 2639 ViewCell *left = interior->mChildren[0]; 2640 ViewCell *right = interior->mChildren[1]; 2641 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 } 2655 } 2656 2657 2614 2658 void VspBspViewCellsManager::RefineViewCells(const VssRayContainer &rays, 2615 2659 const ObjectContainer &objects)
Note: See TracChangeset
for help on using the changeset viewer.