Changeset 516 for trunk/VUT/GtpVisibilityPreprocessor/src/RssTree.h
- Timestamp:
- 01/11/06 15:50:37 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/RssTree.h
r512 r516 300 300 // 301 301 ///////////////////////////////// 302 303 304 // the bbox of the node 305 AxisAlignedBox3 bbox; 306 307 // the bbox of the node 308 AxisAlignedBox3 dirBBox; 309 302 310 303 311 inline RssTreeNode(RssTreeInterior *p); … … 333 341 RssTreeNode *back, *front; 334 342 335 // the bbox of the node336 AxisAlignedBox3 bbox;337 338 // the bbox of the node339 AxisAlignedBox3 dirBBox;340 343 341 344 // data for caching … … 611 614 ///////////////////////////// 612 615 // The core pointer 613 RssTreeNode *root; 616 vector<RssTreeNode *> mRoots; 617 618 614 619 615 620 ///////////////////////////// … … 618 623 // total number of nodes of the tree 619 624 int nodes; 625 620 626 // axis aligned bounding box of the scene 621 627 AxisAlignedBox3 bbox; … … 625 631 626 632 // forced bounding box for from viewcell visibility 627 AxisAlignedBox3 *mForcedBoundingBox;633 // AxisAlignedBox3 *mForcedBoundingBox; 628 634 629 635 ///////////////////////////// … … 652 658 float termMaxRayContribution; 653 659 654 655 660 // randomized construction 656 661 bool randomize; 662 663 // use a root per object in the tree 664 bool mPerObjectTree; 657 665 658 666 // type of the splitting to use fo rthe tree construction … … 711 719 virtual void 712 720 Construct( 713 VssRayContainer &rays, 714 AxisAlignedBox3 *forcedBoundingBox = NULL 721 ObjectContainer &objects, 722 VssRayContainer &rays 723 // AxisAlignedBox3 *forcedBoundingBox = NULL 715 724 ); 716 725 … … 849 858 850 859 AxisAlignedBox3 GetBBox(const RssTreeNode *node) const { 851 if (node->parent == NULL) 852 return bbox; 853 854 if (!node->IsLeaf()) 855 return ((RssTreeInterior *)node)->bbox; 856 857 if (node->parent->axis >= 3) 858 return node->parent->bbox; 860 return node->bbox; 861 862 // if (node->parent == NULL) 863 // return bbox; 864 865 // if (!node->IsLeaf()) 866 // return ((RssTreeInterior *)node)->bbox; 867 868 // if (node->parent->axis >= 3) 869 // return node->parent->bbox; 859 870 860 AxisAlignedBox3 box(node->parent->bbox);861 if (node->parent->front == node)862 box.SetMin(node->parent->axis, node->parent->position);863 else864 box.SetMax(node->parent->axis, node->parent->position);865 return box;871 // AxisAlignedBox3 box(node->parent->bbox); 872 // if (node->parent->front == node) 873 // box.SetMin(node->parent->axis, node->parent->position); 874 // else 875 // box.SetMax(node->parent->axis, node->parent->position); 876 // return box; 866 877 } 867 878 … … 869 880 870 881 AxisAlignedBox3 GetDirBBox(const RssTreeNode *node) const { 871 872 if (node->parent == NULL)873 return dirBBox;882 return node->dirBBox; 883 // if (node->parent == NULL) 884 // return dirBBox; 874 885 875 if (!node->IsLeaf() )876 return ((RssTreeInterior *)node)->dirBBox;877 878 if (node->parent->axis < 3)879 return node->parent->dirBBox;886 // if (!node->IsLeaf() ) 887 // return ((RssTreeInterior *)node)->dirBBox; 888 889 // if (node->parent->axis < 3) 890 // return node->parent->dirBBox; 880 891 881 AxisAlignedBox3 dBBox(node->parent->dirBBox);882 883 if (node->parent->front == node)884 dBBox.SetMin(node->parent->axis - 3, node->parent->position);885 else886 dBBox.SetMax(node->parent->axis - 3, node->parent->position);887 return dBBox;892 // AxisAlignedBox3 dBBox(node->parent->dirBBox); 893 894 // if (node->parent->front == node) 895 // dBBox.SetMin(node->parent->axis - 3, node->parent->position); 896 // else 897 // dBBox.SetMax(node->parent->axis - 3, node->parent->position); 898 // return dBBox; 888 899 } 889 900 … … 978 989 ); 979 990 980 RssTreeNode *GetRoot( ) const { return root; }991 RssTreeNode *GetRoot(Intersectable *object = NULL) const; 981 992 982 993 bool … … 1053 1064 vector<RssTreeLeaf::SilhouetteRays> &rays 1054 1065 ); 1055 1066 1067 void 1068 PushRoots(priority_queue<TraversalData> &stack) const; 1069 1070 void 1071 PushRoots(stack<RssTreeNode *> &st) const; 1072 1073 void 1074 PushRoots(stack<RayTraversalData> &st, RssTreeNode::RayInfo &info) const; 1075 1076 1056 1077 }; 1057 1078
Note: See TracChangeset
for help on using the changeset viewer.