- Timestamp:
- 11/01/05 20:02:22 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
r362 r366 56 56 57 57 Sampling { 58 totalSamples 200000 58 totalSamples 20000000 59 59 samplesPerPass 3 60 60 } … … 68 68 maxViewCells 0 69 69 70 minPvsDif 10 70 minPvsDif 100 71 # maxPvsSize 200 71 72 72 73 # filename ../data/atlanta/atlanta_viewcells_large.x3d -
trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
r339 r366 9 9 Preprocessor::Preprocessor(): 10 10 mKdTree(NULL), 11 mBspTree(NULL), 12 mViewCellsType(BSP_VIEW_CELLS) 11 mBspTree(NULL) 13 12 { 14 13 } … … 52 51 environment->GetStringValue("ViewCells.hierarchy", viewCellsStr); 53 52 54 int vcType = BSP_VIEW_CELLS;55 56 53 if (strcmp(viewCellsStr, "bspTree") == 0) 57 mViewCellsType = BSP_VIEW_CELLS;54 ViewCell::sHierarchy = ViewCell::BSP; 58 55 else if (strcmp(viewCellsStr, "kdTree") == 0) 59 mViewCellsType = KD_VIEW_CELLS;56 ViewCell::sHierarchy = ViewCell::KD; 60 57 else if (strcmp(viewCellsStr, "sceneDependent") == 0) 61 58 { … … 67 64 exit(1); 68 65 } 69 70 if (mViewCellsType == KD_VIEW_CELLS)71 Debug << "kdtree" << endl;72 else if (mViewCellsType == BSP_VIEW_CELLS)73 Debug << "bsptree" << endl;74 66 75 67 return true; -
trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.h
r329 r366 115 115 /// the view cell corresponding to unbounded space 116 116 ViewCell mUnbounded; 117 118 /// view cell hierarchy types119 enum {BSP_VIEW_CELLS, KD_VIEW_CELLS, SCENE_DEPENDENT};120 121 /// type of the view cells122 int mViewCellsType;123 117 }; 124 118 -
trunk/VUT/GtpVisibilityPreprocessor/src/Pvs.h
r362 r366 148 148 typedef Pvs<Intersectable *> ViewCellPvs; 149 149 150 150 151 #endif 151 152 -
trunk/VUT/GtpVisibilityPreprocessor/src/Ray.cpp
r362 r366 194 194 } 195 195 196 197 void Ray::Insert(const BspIntersection &bspi) 198 { 199 vector<BspIntersection>::iterator it; 200 201 while (it != 202 } 203 196 204 ostream & 197 205 operator<<(ostream &s, const PassingRaySet &set) -
trunk/VUT/GtpVisibilityPreprocessor/src/Ray.h
r362 r366 56 56 }; 57 57 58 struct BspIntersection 59 { 60 float mT; 61 BspLeaf *leaf; 62 BspIntersection(float t, BspLeaf *l): mT(t), leaf(l) 63 {} 64 65 bool operator<(const BspIntersection &b) const 66 { 67 return mT < b.mT; 68 } 69 }; 70 58 71 // I should have some abstract cell data type !!! here 59 72 // corresponds to the spatial elementary cell … … 62 75 63 76 vector<Intersection> intersections; 77 vector<BspIntersection> bspIntersections; 64 78 vector<KdLeaf *> kdLeaves; 65 79 vector<MeshInstance *> meshes; 66 vector<BspLeaf *> bspLeaves;67 80 68 81 // constructors … … 197 210 int ClassifyPlane(const Plane3 &plane, const float minT, const float maxT) const; 198 211 212 void Insert(const BspIntersection &bspi); 213 199 214 private: 200 215 Vector3 loc, dir; // Describes ray origin and vector -
trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
r365 r366 121 121 for (j=1; j < ((int)ray.bspLeaves.size() - 1); ++ j) 122 122 { 123 if (ray.bspLeaves[j]->GetViewCell() != &mUnbounded) 124 ray.bspLeaves[j]->GetViewCell()-> 123 BspLeaf *leaf = ray.bspIntersections.leaf; 124 125 if (leaf->GetViewCell() != &mUnbounded) 126 leaf->GetViewCell()-> 125 127 AddPassingRay(ray, contributingSamples ? 1 : 0); 126 128 } … … 162 164 } 163 165 164 if ( mViewCellsType == BSP_VIEW_CELLS)166 if (ViewCell::sHierarchy == ViewCell::BSP) 165 167 { 166 168 // cast ray to BSP tree to get intersection with view cells … … 376 378 int passSamples = 0; 377 379 int index = 0; 378 Real maxTime = 0; 379 int maxTimeIdx = 0; 380 380 381 int reverseSamples = 0; 381 382 bool collectSamplesForBsp = 382 ( mViewCellsType == BSP_VIEW_CELLS) &&383 (ViewCell::sHierarchy == ViewCell::BSP) && 383 384 (BspTree::sConstructionMethod == BspTree::FROM_RAYS) && 384 385 (totalSamples < mBspConstructionSamples); 385 386 386 cout << "totalSamples: " << totalSamples << endl;387 //cout << "totalSamples: " << totalSamples << endl; 387 388 388 389 for (i = 0; i < objects.size(); i++) { … … 392 393 393 394 int pvsSize = 0; 394 if ( mViewCellsType == KD_VIEW_CELLS)395 if (ViewCell::sHierarchy == ViewCell::KD) 395 396 pvsSize = object->mKdPvs.GetSize(); 396 397 … … 402 403 int faceIndex = object->GetRandomSurfacePoint(point, normal); 403 404 404 long samplesPerObjStart = GetTime();405 406 405 bool viewcellSample = true; 407 406 int sampleContributions; … … 456 455 } 457 456 //------------------- 458 if ( mViewCellsType == BSP_VIEW_CELLS)457 if (ViewCell::sHierarchy == ViewCell::BSP) 459 458 { 460 459 ProcessBspViewCells(collectSamplesForBsp, … … 471 470 // object->GetRandomVisibleMesh(Plane3(normal, point)); 472 471 } 473 474 // measure maximal time for samples per object475 Real t = TimeDiff(samplesPerObjStart, GetTime());476 477 if (t > maxTime)478 {479 maxTime = t;480 maxTimeIdx = i;481 }482 472 483 473 // CORR matt: must add all samples … … 494 484 int pvsSize = 0; 495 485 496 if ( mViewCellsType == BSP_VIEW_CELLS) {486 if (ViewCell::sHierarchy == ViewCell::BSP) { 497 487 for (i=0; i < mViewCells.size(); i++) { 498 488 ViewCell *vc = mViewCells[i]; … … 506 496 } 507 497 508 Debug << "maximal time needed for pass: " << maxTime << " (object " << maxTimeIdx << ")" << endl;509 510 498 float avgRayContrib = (passContributingSamples > 0) ? 511 499 passSampleContributions/(float)passContributingSamples : 0; … … 529 517 } 530 518 531 if ( mViewCellsType == KD_VIEW_CELLS)519 if (ViewCell::sHierarchy == ViewCell::KD) 532 520 cout << "#totalPvsSize=" << mKdTree->CollectLeafPvs() << endl; 533 521 … … 535 523 if (mBspTree) 536 524 { 525 cout << "starting post processing ... "; 526 527 Debug << "original pvs size: " << mBspTree->CountViewCellPvs() << endl; 528 529 long startTime = GetTime(); 537 530 int merged = PostprocessViewCells(mSampleRays); 538 Debug << "merged " << merged << " view cells" << endl; 539 540 ViewCellContainer vc; 541 mBspTree->CollectViewCells(vc); 542 543 ViewCellContainer::const_iterator it, it_end = vc.end(); 544 545 int mergedPvs = 0; 546 for (it = vc.begin(); it != it_end; ++ it) 547 mergedPvs += (*it)->GetPvs().GetSize(); 548 549 Debug << "merged pvs size: " << mergedPvs << endl; 531 532 cout << "finished" << endl; 533 cout << "merged " << merged << " view cells in " 534 << TimeDiff(startTime, GetTime()) *1e-3 << " secs" << endl; 535 536 //-- recount pvs 537 Debug << "merged pvs size: " << mBspTree->CountViewCellPvs() << endl; 550 538 551 539 } … … 557 545 exporter->ExportKdTree(*mKdTree); 558 546 559 if (mBspTree && ( mViewCellsType == BSP_VIEW_CELLS))547 if (mBspTree && (ViewCell::sHierarchy == ViewCell::BSP)) 560 548 exporter->ExportBspTree(*mBspTree); 561 549 … … 580 568 //-- several visualizations and statistics 581 569 if (1) { 582 if (mBspTree && (mViewCellsType == BSP_VIEW_CELLS))570 if (mBspTree && (ViewCell::sHierarchy == ViewCell::BSP)) 583 571 { 584 572 bool exportSplits = false; … … 672 660 RayContainer::const_iterator rit, rit_end = rays.end(); 673 661 vector<BspLeaf *>::const_iterator lit; 674 if (0) 662 675 663 for (rit = rays.begin(); rit != rays.end(); ++ rit) 676 664 { 677 665 // traverse leaves stored in the rays and compare and merge consecutive 678 666 // leaves (i.e., the neighbors in the tree) 667 if ((*rit)->bspLeaves.empty()) 668 continue; 669 679 670 lit = (*rit)->bspLeaves.begin(); 680 671 … … 693 684 } 694 685 } 686 695 687 return merged; 696 688 } … … 775 767 for (int i = 0; i < (int)bspLeaves.size(); ++ i) 776 768 { 777 if (bspLeaves[i] == ray->bspLeaves[j])769 if (bspLeaves[i]->GetViewCell() == ray->bspLeaves[j]->GetViewCell()) 778 770 { 779 771 vcRays[i].push_back(*ray); … … 799 791 ViewCellPvsMap::iterator it = vc->GetPvs().mEntries.begin(); 800 792 793 exporter->SetWireframe(); 794 801 795 Material m;//= RandomMaterial(); 802 796 m.mDiffuseColor = RgbColor(0, 1, 0); 803 797 exporter->SetForcedMaterial(m); 804 798 805 exporter->SetWireframe();806 807 799 if (vc->GetMesh()) 808 800 exporter->ExportViewCell(vc); … … 810 802 { 811 803 PolygonContainer cell; 812 813 mBspTree->ConstructGeometry(bspLeaves[i] , cell);804 // export view cell 805 mBspTree->ConstructGeometry(bspLeaves[i]->GetViewCell(), cell); 814 806 exporter->ExportPolygons(cell); 815 807 CLEAR_CONTAINER(cell); 816 817 /*vector<BspLeaf *> neighbors;818 mBspTree->FindNeighbors(bspLeaves[j], neighbors);819 for (int j = 0; j < (int)neighbors.size(); ++ j)820 { if (neighbors[j]->mViewCell == bspLeaves[j]->mViewCell)821 {}}*/822 808 } 823 809 -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp
r362 r366 4 4 #include "MeshKdTree.h" 5 5 #include "Triangle3.h" 6 7 ViewCell::HierarchyType ViewCell::sHierarchy = BSP; 6 8 7 9 ViewCell::ViewCell(): MeshInstance(NULL), mPiercingRays(0) … … 13 15 } 14 16 15 ViewCellPvs &ViewCell::GetPvs() 17 ViewCell *ViewCell::Generate(Mesh *mesh) 18 { 19 switch(sHierarchy) 20 { 21 case KD: 22 return new ViewCell(mesh); 23 case BSP: 24 return new BspViewCell(mesh); 25 default: 26 Debug << "should not come here" << endl; 27 return NULL; 28 } 29 } 30 31 ViewCellPvs &ViewCell::GetPvs() 16 32 { 17 33 return mPvs; … … 28 44 { 29 45 // maximal max viewcells 30 int limit = maxViewCells > 0 ? Min((int)objects.size(), maxViewCells) : (int)objects.size(); 46 int limit = maxViewCells > 0 ? 47 Min((int)objects.size(), maxViewCells) : (int)objects.size(); 31 48 32 49 for (int i = 0; i < limit; ++ i) … … 39 56 MeshInstance *inst = dynamic_cast<MeshInstance *>(object); 40 57 41 ViewCell *viewCell = new ViewCell(inst->GetMesh());58 ViewCell *viewCell = Generate(inst->GetMesh()); 42 59 viewCells.push_back(viewCell); 43 60 } … … 78 95 mesh->Preprocess(); 79 96 80 return new ViewCell(mesh);97 return Generate(mesh); 81 98 } 82 99 83 100 ViewCell *ViewCell::Merge(ViewCell &front, ViewCell &back) 84 101 { 85 ViewCell *vc = new ViewCell();102 ViewCell *vc = Generate(); 86 103 // merge pvs 87 104 vc->mPvs.Merge(front.mPvs, back.mPvs); -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.h
r362 r366 11 11 class BspPvs; 12 12 struct Triangle3; 13 class BspLeaf; 13 14 14 15 /** … … 54 55 static ViewCell *Merge(ViewCell &front, ViewCell &back); 55 56 56 57 57 /// Ray set description of the rays passing through this node. 58 58 PassingRaySet mPassingRays; … … 60 60 /// Rays piercing this view cell. 61 61 RayContainer mPiercingRays; 62 63 /// view cells types 64 enum HierarchyType {BSP, KD}; 65 66 /** Generates view cells of type specified by view cells type. 67 */ 68 static ViewCell *Generate(Mesh *mesh = NULL); 69 70 /// type of view cells hierarchy (KD, BSP) 71 static HierarchyType sHierarchy; 62 72 63 73 protected: … … 67 77 }; 68 78 69 //}; // GtpVisibilityPreprocessor 79 class BspViewCell: public ViewCell 80 { 81 public: 82 BspViewCell(): mBspLeaves(0) {} 83 BspViewCell(Mesh *mesh): 84 ViewCell(mesh), mBspLeaves(0) {} 85 86 /// Leaves which hold this view cell. 87 vector<BspLeaf *> mBspLeaves; 88 }; 70 89 71 90 #endif -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r362 r366 260 260 } 261 261 262 BspLeaf::BspLeaf( ViewCell *viewCell):262 BspLeaf::BspLeaf(BspViewCell *viewCell): 263 263 mViewCell(viewCell) 264 264 { … … 269 269 {} 270 270 271 BspLeaf::BspLeaf(BspInterior *parent, ViewCell *viewCell):271 BspLeaf::BspLeaf(BspInterior *parent, BspViewCell *viewCell): 272 272 BspNode(parent), mViewCell(viewCell) 273 273 { 274 274 } 275 275 276 ViewCell *BspLeaf::GetViewCell() 276 BspViewCell *BspLeaf::GetViewCell() const 277 277 { 278 278 return mViewCell; 279 279 } 280 280 281 void BspLeaf::SetViewCell( ViewCell *viewCell)281 void BspLeaf::SetViewCell(BspViewCell *viewCell) 282 282 { 283 283 mViewCell = viewCell; … … 297 297 contributingSamples = 0; 298 298 299 mViewCell = new ViewCell(); 299 mViewCell = dynamic_cast<BspViewCell *>(ViewCell::Generate()); 300 mViewCell->mBspLeaves.push_back(this); 300 301 301 302 BoundedRayContainer::const_iterator it, it_end = rays.end(); … … 320 321 } 321 322 322 ray->bsp Leaves.push_back(this);323 ray->bspIntersections.push_back(BspIntersection(this, (*it)->mMinT); 323 324 324 325 if (storeRays) … … 711 712 { 712 713 // add view cell to leaf 713 leaf->SetViewCell(tData.mViewCell); 714 leaf->SetViewCell(dynamic_cast<BspViewCell *>(tData.mViewCell)); 715 leaf->mViewCell->mBspLeaves.push_back(leaf); 714 716 } 715 717 … … 1244 1246 float sumBalancedRays = 0; 1245 1247 float sumRaySplits = 0; 1248 float pvsSize = 0; 1249 1250 Intersectable::NewMail(); 1246 1251 1247 1252 BoundedRayContainer::const_iterator rit, rit_end = rays.end(); … … 1264 1269 { 1265 1270 sumRaySplits += sLeastRaySplitsTable[classification]; 1271 } 1272 1273 if (sSplitPlaneStrategy & PVS) 1274 { 1275 vector<Ray::Intersection>::const_iterator it, 1276 it_end = ray->intersections.end(); 1277 1278 for (it = ray->intersections.begin(); it != it_end; ++ it) 1279 { 1280 if (!(*it).mObject->Mailed()) 1281 { 1282 (*it).mObject->Mail(); 1283 } 1284 } 1266 1285 } 1267 1286 } … … 1597 1616 } 1598 1617 1618 int BspTree::CountViewCellPvs() const 1619 { 1620 int count = 0; 1621 stack<BspNode *> nodeStack; 1622 nodeStack.push(mRoot); 1623 1624 ViewCell::NewMail(); 1625 1626 // exclude root cell 1627 mRootCell->Mail(); 1628 1629 while (!nodeStack.empty()) 1630 { 1631 BspNode *node = nodeStack.top(); 1632 nodeStack.pop(); 1633 1634 if (node->IsLeaf()) 1635 { 1636 ViewCell *viewCell = dynamic_cast<BspLeaf *>(node)->mViewCell; 1637 1638 if (!viewCell->Mailed()) 1639 { 1640 viewCell->Mail(); 1641 count += viewCell->GetPvs().GetSize(); 1642 } 1643 } 1644 else 1645 { 1646 BspInterior *interior = dynamic_cast<BspInterior *>(node); 1647 1648 nodeStack.push(interior->mFront); 1649 nodeStack.push(interior->mBack); 1650 } 1651 } 1652 return count; 1653 } 1599 1654 1600 1655 bool BspTree::MergeViewCells(BspLeaf *front, BspLeaf *back) const 1601 1656 { 1602 ViewCell *viewCell = ViewCell::Merge(*front->mViewCell, *back->mViewCell); 1657 BspViewCell *viewCell = 1658 dynamic_cast<BspViewCell *>(ViewCell::Merge(*front->mViewCell, *back->mViewCell)); 1603 1659 1604 1660 if (!viewCell) 1605 1661 return false; 1606 1662 1607 DEL_PTR(front->mViewCell); 1608 DEL_PTR(back->mViewCell); 1609 1610 front->SetViewCell(viewCell); 1611 back->SetViewCell(viewCell); 1663 // change view cells of all leaves associated with the 1664 // previous view cells 1665 1666 BspViewCell *fVc = front->mViewCell; 1667 BspViewCell *bVc = back->mViewCell; 1668 1669 vector<BspLeaf *> fLeaves = fVc->mBspLeaves; 1670 vector<BspLeaf *> bLeaves = bVc->mBspLeaves; 1671 1672 vector<BspLeaf *>::const_iterator it; 1673 1674 for (it = fLeaves.begin(); it != fLeaves.end(); ++ it) 1675 { 1676 (*it)->SetViewCell(viewCell); 1677 viewCell->mBspLeaves.push_back(*it); 1678 } 1679 for (it = bLeaves.begin(); it != bLeaves.end(); ++ it) 1680 { 1681 (*it)->SetViewCell(viewCell); 1682 viewCell->mBspLeaves.push_back(*it); 1683 } 1684 1685 DEL_PTR(fVc); 1686 DEL_PTR(bVc); 1612 1687 1613 1688 return true; … … 1616 1691 bool BspTree::ShouldMerge(BspLeaf *front, BspLeaf *back) const 1617 1692 { 1618 if (front->mViewCell->GetPvs().Diff(back->mViewCell->GetPvs()) < 1619 sMinPvsDif) 1620 return true; 1621 1622 if (back->mViewCell->GetPvs().Diff(front->mViewCell->GetPvs()) < 1623 sMinPvsDif) 1693 ViewCell *fvc = front->mViewCell; 1694 ViewCell *bvc = back->mViewCell; 1695 1696 if ((fvc == mRootCell) || (bvc == mRootCell) || (fvc == bvc)) 1697 return false; 1698 1699 /*Debug << "merge (" << sMinPvsDif << ")" << endl; 1700 Debug << "size f: " << fvc->GetPvs().GetSize() << ", " 1701 << "size b: " << bvc->GetPvs().GetSize() << endl; 1702 1703 Debug << "diff f: " << fvc->GetPvs().Diff(bvc->GetPvs()) << ", " 1704 << "diff b: " << bvc->GetPvs().Diff(fvc->GetPvs()) << endl;*/ 1705 1706 if ((fvc->GetPvs().Diff(bvc->GetPvs()) < sMinPvsDif) && 1707 (bvc->GetPvs().Diff(fvc->GetPvs()) < sMinPvsDif)) 1624 1708 return true; 1625 1709 … … 1965 2049 } 1966 2050 2051 void BspTree::ConstructGeometry(BspViewCell *vc, PolygonContainer &cell) const 2052 { 2053 vector<BspLeaf *> leaves = vc->mBspLeaves; 2054 2055 vector<BspLeaf *>::const_iterator it, it_end = leaves.end(); 2056 2057 for (it = leaves.begin(); it != it_end; ++ it) 2058 ConstructGeometry(*it, cell); 2059 } 2060 1967 2061 int BspTree::FindNeighbors(BspNode *n, vector<BspLeaf *> &neighbors, 1968 2062 const bool onlyUnmailed) const … … 2121 2215 return NULL; 2122 2216 } 2217 2218 int BspTree::CountPvs(const BoundedRayContainer &rays) const 2219 { 2220 int pvsSize = 0; 2221 2222 BoundedRayContainer::const_iterator rit, rit_end = rays.end(); 2223 vector<BspLeaf *>::const_iterator lit; 2224 2225 ViewCell::NewMail(); 2226 2227 for (rit = rays.begin(); rit != rit_end; ++ rit) 2228 { 2229 Ray *ray = (*rit)->mRay; 2230 2231 for (lit = ray->bspLeaves.begin(); lit != ray->bspLeaves.end(); ++ lit) 2232 { 2233 if ((*lit)->mViewCell->Mailed()) 2234 { 2235 pvsSize += (*lit)->mViewCell->GetPvs().GetSize(); 2236 } 2237 } 2238 } 2239 2240 return pvsSize; 2241 } -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
r362 r366 7 7 8 8 class ViewCell; 9 class BspViewCell; 9 10 class Plane3; 10 11 class BspTree; … … 230 231 public: 231 232 BspLeaf(); 232 BspLeaf( ViewCell *viewCell);233 BspLeaf(BspViewCell *viewCell); 233 234 BspLeaf(BspInterior *parent); 234 BspLeaf(BspInterior *parent, ViewCell *viewCell);235 BspLeaf(BspInterior *parent, BspViewCell *viewCell); 235 236 236 237 /** @return true since it is an interior node 237 238 */ 238 239 bool IsLeaf() const; 239 /** Returns pointer from view cell. 240 */ 241 ViewCell *GetViewCell(); 240 241 /** Returns pointer of view cell. 242 */ 243 BspViewCell *GetViewCell() const; 244 242 245 /** Sets pointer to view cell. 243 246 */ 244 void SetViewCell( ViewCell *viewCell);247 void SetViewCell(BspViewCell *viewCell); 245 248 246 249 /** Generates new view cell and adds rays to the PVS. … … 257 260 258 261 /// if NULL this does not correspond to feasible viewcell 259 ViewCell *mViewCell;262 BspViewCell *mViewCell; 260 263 }; 261 264 … … 379 382 const bool onlyUnmailed) const; 380 383 381 /** Extracts geometry associated with the split plane leading to this node. 382 */ 383 void ConstructGeometry(BspNode *n, PolygonContainer &polys) const; 384 /** Constructs geometry associated with the half space intersections 385 leading to this node. 386 */ 387 void ConstructGeometry(BspNode *n, PolygonContainer &cell) const; 384 388 389 /** Construct geometry of view cell. 390 */ 391 void ConstructGeometry(BspViewCell *vc, PolygonContainer &cell) const; 392 385 393 /** Returns random leaf of BSP tree. 386 394 @param halfspace defines the halfspace from which the leaf is taken. … … 413 421 */ 414 422 bool MergeViewCells(BspLeaf *front, BspLeaf *back) const; 423 424 /** Traverses tree and counts PVS size of all view cells 425 */ 426 int CountViewCellPvs() const; 415 427 416 428 protected: … … 644 656 void ExtractSplitPlanes(BspNode *n, vector<Plane3 *> &planes, vector<bool> &sides) const; 645 657 658 int CountPvs(const BoundedRayContainer &rays) const; 646 659 /// Pointer to the root of the tree 647 660 BspNode *mRoot; … … 663 676 BLOCKED_RAYS = 128, 664 677 LEAST_RAY_SPLITS = 256, 665 BALANCED_RAYS = 512 678 BALANCED_RAYS = 512, 679 PVS = 1024 666 680 }; 667 681 … … 742 756 }; 743 757 744 //}; // GtpVisibilityPreprocessor745 746 758 #endif -
trunk/VUT/GtpVisibilityPreprocessor/src/main.cpp
r344 r366 42 42 // construction method. For "from rays" construction, wait until there is 43 43 // a certain number of rays collected 44 if ( p->mViewCellsType == Preprocessor::BSP_VIEW_CELLS&&44 if (ViewCell::sHierarchy == ViewCell::BSP && 45 45 !(BspTree::sConstructionMethod == BspTree::FROM_RAYS)) 46 46 {
Note: See TracChangeset
for help on using the changeset viewer.