- Timestamp:
- 01/15/09 16:32:50 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/VisibilitySolutionLoader.cpp
r3271 r3279 38 38 39 39 ViewCellsTree *viewCellsTree = new ViewCellsTree(); 40 41 40 bool ok = viewCellsTree->_LoadFromFile(fr, viewCellsScaleFactor); 42 41 … … 100 99 nodes.push_back(node); 101 100 102 if (!node->Is Leaf())101 if (!node->IsVirtualLeaf()) 103 102 { 104 103 BvhInterior *interior = static_cast<BvhInterior *>(node); … … 116 115 117 116 117 bool VisibilitySolutionLoader::CreateIdSortedList2(BvhNode *n, 118 BvhNodeContainer &nodes) 119 { 120 nodes.push_back(n); 121 122 if (!n->IsVirtualLeaf()) 123 { 124 BvhInterior *interior = static_cast<BvhInterior *>(n); 125 126 BvhNode *front = interior->GetFront(); 127 BvhNode *back = interior->GetBack(); 128 129 CreateIdSortedList2(front, nodes); 130 CreateIdSortedList2(back, nodes); 131 } 132 133 return true; 134 } 135 136 118 137 bool VisibilitySolutionLoader::LoadPvs(FILE *fw, Bvh *bvh) 119 138 { 120 139 int number, entries; 121 122 140 fread(&number, sizeof(int), 1, fw); 123 141 … … 135 153 136 154 BvhNodeContainer nodes; 137 CreateIdSortedList(bvh, nodes); 138 155 CreateIdSortedList2(bvh->GetStaticRoot(), nodes); 156 //CreateIdSortedList(bvh, nodes); 157 ofstream outstream("test.log"); 158 159 for (size_t i = 0; i < nodes.size(); ++ i) 160 outstream << "id " << nodes[i]->GetId() << endl; 161 162 outstream.close(); 163 164 139 165 for (int i = 0; i < number; ++ i) 140 166 { … … 194 220 AxisAlignedBox3 newBox1 = box; 195 221 AxisAlignedBox3 newBox2 = box; 196 /*if (node->mPosition < newBox.Min(node->mAxis)) 197 cout << "e: " << node->mPosition << " " << newBox.Min(node->mAxis) << endl; 198 else if (node->mPosition > newBox.Min(node->mAxis)) 199 cout << "o: " << node->mPosition << " " << newBox.Min(node->mAxis) << endl; 200 */ 222 201 223 newBox1.SetMin(node->mAxis, node->mPosition); 202 224 newBox2.SetMax(node->mAxis, node->mPosition);
Note: See TracChangeset
for help on using the changeset viewer.