- Timestamp:
- 07/10/06 19:21:19 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.h
r1012 r1112 176 176 mMax = center + newSize; 177 177 } 178 178 179 void Scale(const Vector3 &scale) { 180 Vector3 newSize = Size()*(scale*0.5f); 181 Vector3 center = Center(); 182 mMin = center - newSize; 183 mMax = center + newSize; 184 } 185 186 /** Translates the box with the factor. 187 */ 188 void Translate(const Vector3 &shift) { 189 mMin += shift; 190 mMax += shift; 191 } 192 179 193 /** Returns the square of the minimal and maximal distance to 180 194 a point on the box. -
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r1106 r1112 1695 1695 RegisterOption("Preprocessor.quitOnFinish", 1696 1696 optBool, 1697 "preprocessor_quit_on_finish =",1697 "preprocessor_quit_on_finish", 1698 1698 "true"); 1699 1699 … … 1799 1799 RegisterOption("RssPreprocessor.useImportanceSampling", 1800 1800 optBool, 1801 "rss_use_importance =",1801 "rss_use_importance", 1802 1802 "true"); 1803 1803 1804 1804 RegisterOption("RssPreprocessor.objectBasedSampling", 1805 1805 optBool, 1806 "rss_object_based_sampling =",1806 "rss_object_based_sampling", 1807 1807 "true"); 1808 1808 1809 1809 RegisterOption("RssPreprocessor.directionalSampling", 1810 1810 optBool, 1811 "rss_directional_sampling =",1811 "rss_directional_sampling", 1812 1812 "false"); 1813 1813 -
GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.h
r1106 r1112 88 88 const RgbColor &color = RgbColor(1,1,1) 89 89 ) = 0; 90 90 91 virtual bool 92 ExportRaySets(const vector<VssRayContainer> &rays, 93 const RgbColor &color) = 0; 94 91 95 virtual void 92 96 ExportViewCells(const ViewCellContainer &viewCells) = 0; -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
r1004 r1112 73 73 { 74 74 mSceneGraph->CollectObjects(&mObjects); 75 76 // mViewCellsManager->GetViewPoint(mViewPoint); 77 75 78 mViewPoint = mSceneGraph->GetBox().Center(); 76 79 mViewDirection = Vector3(0,0,1); 77 80 78 mViewPoint = Vector3(991.7, 187.8, -271);79 mViewDirection = Vector3(0.9, 0, -0.4);81 // mViewPoint = Vector3(991.7, 187.8, -271); 82 // mViewDirection = Vector3(0.9, 0, -0.4); 80 83 81 84 // timerId = startTimer(10); … … 740 743 // different executions of the algorithm 741 744 742 // mViewCellsManager->GetViewPoint(mViewPoint);745 // mViewCellsManager->GetViewPoint(mViewPoint); 743 746 744 747 while (1) { … … 747 750 halton.GetNumber(3)); 748 751 749 mViewPoint = m SceneGraph->GetBox().GetPoint(pVector);752 mViewPoint = mViewCellsManager->GetViewSpaceBox().GetPoint(pVector); 750 753 ViewCell *v = mViewCellsManager->GetViewCell(mViewPoint); 751 754 if (v && v->GetValid()) … … 754 757 halton.GenerateNext(); 755 758 } 756 757 759 758 760 Vector3 dVector = Vector3(2*M_PI*halton.GetNumber(4), … … 816 818 glDepthMask(GL_FALSE); 817 819 glDisable( GL_CULL_FACE ); 820 818 821 819 822 query.BeginQuery(); … … 840 843 841 844 PrVs prvs; 842 // mViewCellsManager->SetMaxFilterSize(1); 845 846 mViewCellsManager->SetMaxFilterSize(0); 843 847 mViewCellsManager->GetPrVS(mViewPoint, prvs, mViewCellsManager->GetFilterWidth()); 844 848 viewcell = prvs.mViewCell; … … 898 902 if (qGreen(p) != 255 && index!=0) { 899 903 if (index != lastIndex) { 900 Debug<<"ei="<<index<<" ";904 // Debug<<"ei="<<index<<" "; 901 905 lastIndex = index; 902 906 } … … 931 935 } 932 936 933 if (viewcell )937 if (viewcell && mViewCellsManager->GetMaxFilterSize() > 0) 934 938 mViewCellsManager->DeleteLocalMergeTree(viewcell); 935 939 … … 1183 1187 1184 1188 makeCurrent(); 1189 1190 1185 1191 SetupProjection(GetWidth(), GetHeight()); 1192 1186 1193 1187 1194 for (int i=0; i < mPvsStatFrames; i++) { … … 1204 1211 if (mPvsErrorBuffer[i].mError > 0.0f) { 1205 1212 int pvsSize; 1213 1214 1206 1215 float error = GetPixelError(pvsSize); 1207 1216 mPvsErrorBuffer[i].mError = error; … … 1370 1379 updateGL(); 1371 1380 break; 1381 case Qt::Key_P: 1382 // set random viewpoint 1383 mViewCellsManager->GetViewPoint(mViewPoint); 1384 updateGL(); 1385 break; 1386 1372 1387 default: 1373 1388 e->ignore(); … … 1579 1594 mRenderErrors = false; 1580 1595 mRenderFilter = true; 1581 mUseFilter = true; 1582 mUseSpatialFilter = true; 1596 1597 bool tmp; 1598 1599 Environment::GetSingleton()->GetBoolValue("Preprocessor.applyVisibilityFilter", tmp ); 1600 mUseFilter = tmp; 1601 1602 Environment::GetSingleton()->GetBoolValue("Preprocessor.applyVisibilitySpatialFilter", 1603 tmp ); 1604 1605 mUseSpatialFilter = tmp; 1606 1583 1607 mShowRenderCost = false; 1584 1608 mShowPvsSizes = false; -
GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.h
r1109 r1112 13 13 namespace GtpVisibilityPreprocessor { 14 14 15 class KdNode; 16 class KdLeaf; 17 class KdInterior; 18 class Intersectable; 19 //class KdViewCell; 20 class Beam; 15 16 class KdNode; 17 class KdLeaf; 18 class KdInterior; 19 class Intersectable; 20 //class KdViewCell; 21 class Beam; 22 23 class KdTree; 24 25 // KdTree *SceneKdTree; 21 26 22 27 // -------------------------------------------------------------- -
GTP/trunk/Lib/Vis/Preprocessing/src/LogManager.h
r1004 r1112 34 34 LogManager(); 35 35 36 ~LogManager(); 36 ~LogManager() {} 37 37 38 38 void LogMessage(const std::string &str); -
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r878 r1112 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: út 2. V 11:18:2320063 # Generated by qmake (2.00a) (Qt 4.1.2) on: po 10. VII 19:18:45 2006 4 4 # Project: preprocessor.pro 5 5 # Template: app -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r1022 r1112 384 384 Environment::GetSingleton()->GetStringValue("ViewCells.type", buf); 385 385 mViewCellsManager = CreateViewCellsManager(buf); 386 } 387 386 387 // default view space is the extent of the scene 388 mViewCellsManager->SetViewSpaceBox(mSceneGraph->GetBox()); 389 390 391 } 392 388 393 //-- parameters for render heuristics evaluation 389 394 float objRenderCost = 0, vcOverhead = 0, moveSpeed = 0; … … 398 403 mViewCellsManager->SetRenderer(mRenderSimulator); 399 404 400 // default view space is the extent of the scene401 mViewCellsManager->SetViewSpaceBox(mSceneGraph->GetBox());402 405 403 406 if (mUseGlRenderer || mUseGlDebugger) -
GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h
r1089 r1112 281 281 282 282 if (data) { 283 data->mSumPdf +=pdf;283 data->mSumPdf += pdf; 284 284 return data->mSumPdf; 285 285 } … … 299 299 300 300 if (data) { 301 data->mSumPdf +=pdf;301 data->mSumPdf += pdf; 302 302 contribution = pdf/data->mSumPdf; 303 303 return false; -
GTP/trunk/Lib/Vis/Preprocessing/src/Ray.h
r860 r1112 317 317 public: 318 318 319 float mSumPdf; 320 321 SimpleRayContainer():vector<SimpleRay>(), mSumPdf(0.0f) {} 322 323 void NormalizePdf() { 319 320 SimpleRayContainer():vector<SimpleRay>() {} 321 322 void NormalizePdf(float scale = 1.0f) { 324 323 iterator it = begin(); 325 float c = 1.0f/mSumPdf;324 float sumPdf = 0.0f; 326 325 for (; it != end(); it++) 326 sumPdf += (*it).mPdf; 327 328 float c = scale/sumPdf; 329 330 for (it = begin(); it != end(); it++) { 327 331 (*it).mPdf*=c; 328 } 329 332 } 333 } 334 330 335 void AddRay(const SimpleRay &ray) { 331 336 push_back(ray); 332 mSumPdf += ray.mPdf;333 337 } 334 338 }; -
GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.cpp
r1027 r1112 23 23 static bool fromBoxVisibility = false; 24 24 25 25 #define ADD_RAYS_IN_PLACE 0 26 26 27 RssPreprocessor::RssPreprocessor(): 27 28 mPass(0), … … 67 68 GenerateImportanceRays(mRssTree, number, rays); 68 69 result = true; 69 // rays.NormalizePdf();70 70 } 71 71 break; … … 75 75 } 76 76 77 // rays.NormalizePdf(); 78 77 79 return result; 78 80 } … … 120 122 int hits = 0; 121 123 static Ray ray; 122 AxisAlignedBox3 box = mKdTree->GetBox(); 124 // AxisAlignedBox3 box = Union(mKdTree->GetBox(), mViewCellsManager->GetViewSpaceBox()); 125 126 AxisAlignedBox3 box = mViewCellsManager->GetViewSpaceBox(); 123 127 124 128 AxisAlignedBox3 sbox = box; … … 284 288 } else { 285 289 int leaves = rssTree->stat.Leaves()/1; 290 286 291 num = rssTree->GenerateRays(desiredSamples, leaves, rays); 287 292 } … … 302 307 Exporter *exporter = NULL; 303 308 exporter = Exporter::GetExporter(filename); 304 // exporter->SetWireframe(); 305 // exporter->ExportKdTree(*mKdTree); 309 if (0) { 310 exporter->SetWireframe(); 311 exporter->ExportKdTree(*mKdTree); 312 } 306 313 exporter->SetFilled(); 307 314 // $$JB temporarily do not export the scene … … 310 317 exporter->SetWireframe(); 311 318 312 if ( mViewSpaceBox) {319 if (1 || mViewSpaceBox) { 313 320 exporter->SetForcedMaterial(RgbColor(1,0,1)); 314 exporter->ExportBox( *mViewSpaceBox);321 exporter->ExportBox(mViewCellsManager->GetViewSpaceBox()); 315 322 exporter->ResetForcedMaterial(); 316 323 } 317 324 318 325 VssRayContainer rays; 319 326 320 vssRays.SelectRays( 327 vssRays.SelectRays(number, rays); 321 328 322 329 exporter->ExportRays(rays, RgbColor(1, 0, 0)); 330 331 delete exporter; 332 333 cout<<"done."<<endl<<flush; 334 335 return true; 336 } 337 338 bool 339 RssPreprocessor::ExportRayAnimation(const char *filename, 340 const vector<VssRayContainer> &vssRays 341 ) 342 { 343 cout<<"Exporting vss rays..."<<endl<<flush; 344 345 Exporter *exporter = NULL; 346 exporter = Exporter::GetExporter(filename); 347 if (0) { 348 exporter->SetWireframe(); 349 exporter->ExportKdTree(*mKdTree); 350 } 351 exporter->SetFilled(); 352 // $$JB temporarily do not export the scene 353 if (1) 354 exporter->ExportScene(mSceneGraph->mRoot); 355 exporter->SetWireframe(); 356 357 if (1 || mViewSpaceBox) { 358 exporter->SetForcedMaterial(RgbColor(1,0,1)); 359 exporter->ExportBox(mViewCellsManager->GetViewSpaceBox()); 360 exporter->ResetForcedMaterial(); 361 } 362 363 exporter->ExportRaySets(vssRays, RgbColor(1, 0, 0)); 323 364 324 365 delete exporter; … … 459 500 } 460 501 461 502 void 503 NormalizeRatios(float ratios[3]) 504 { 505 int i; 506 float sumRatios; 507 sumRatios = ratios[0] + ratios[1] + ratios[2]; 508 if (sumRatios == 0.0f) { 509 ratios[0] = ratios[1] = ratios[2] = 1.0f; 510 sumRatios = 3.0f; 511 } 512 513 for (i=0 ; i < 3; i++) 514 ratios[i]/=sumRatios; 515 #define MIN_RATIO 0.03f 516 for (i=0 ; i < 3; i++) 517 if (ratios[i] < MIN_RATIO) 518 ratios[i] = MIN_RATIO; 519 520 sumRatios = ratios[0] + ratios[1] + ratios[2]; 521 for (i=0 ; i < 3; i++) 522 ratios[i]/=sumRatios; 523 524 } 462 525 463 526 bool … … 472 535 Randomize(0); 473 536 474 537 vector<VssRayContainer> rayBuffer(50); 538 475 539 long startTime = GetTime(); 476 540 … … 480 544 481 545 // if not already loaded, construct view cells from file 482 if (!mLoadViewCells) {483 484 if ( 0)546 if (!mLoadViewCells) 547 { 548 if (1) 485 549 mViewCellsManager->SetViewSpaceBox(mKdTree->GetBox()); 486 550 else { 487 551 AxisAlignedBox3 box = mKdTree->GetBox(); 488 float s = box.Size(0); 489 box.Scale(0.1f); 490 box.SetMin(0, box.Min(0) + s); 491 box.SetMax(0, box.Max(0) + s); 552 553 if (1) { 554 // use a small box outside of the scene 555 box.Scale(Vector3(0.1f,0.5f,0.5f)); 556 box.Translate(Vector3(Magnitude(mKdTree->GetBox().Size())*0.5, 0, 0)); 557 } else { 558 float s = box.Size(0); 559 box.Scale(0.1f); 560 box.SetMin(0, box.Min(0) + s); 561 box.SetMax(0, box.Max(0) + s); 562 } 492 563 493 564 mViewCellsManager->SetViewSpaceBox(box); 494 565 } 495 496 497 498 499 500 501 502 } 503 504 566 567 // construct view cells using it's own set of samples 568 mViewCellsManager->Construct(this); 569 570 //-- several visualizations and statistics 571 Debug << "view cells construction finished: " << endl; 572 mViewCellsManager->PrintStatistics(Debug); 573 } 574 575 505 576 int rssPass = 0; 506 577 int rssSamples = 0; … … 515 586 cout<<"Generating initial rays..."<<endl<<flush; 516 587 517 GenerateRays(mInitialSamples/ 4, SPATIAL_BOX_BASED_DISTRIBUTION, rays);518 GenerateRays(mInitialSamples/ 4, OBJECT_BASED_DISTRIBUTION, rays);519 GenerateRays(mInitialSamples/ 4, DIRECTION_BASED_DISTRIBUTION, rays);520 GenerateRays(mInitialSamples/4, OBJECT_DIRECTION_BASED_DISTRIBUTION, rays);521 588 GenerateRays(mInitialSamples/3, SPATIAL_BOX_BASED_DISTRIBUTION, rays); 589 GenerateRays(mInitialSamples/3, OBJECT_BASED_DISTRIBUTION, rays); 590 GenerateRays(mInitialSamples/3, DIRECTION_BASED_DISTRIBUTION, rays); 591 // GenerateRays(mInitialSamples/4, OBJECT_DIRECTION_BASED_DISTRIBUTION, rays); 592 522 593 cout<<"Casting initial rays..."<<endl<<flush; 523 594 CastRays(rays, mVssRays); … … 537 608 sprintf(filename, "rss-rays-initial.x3d"); 538 609 ExportRays(filename, mVssRays, mExportNumRays); 610 611 mVssRays.SelectRays(mExportNumRays, rayBuffer[0], true); 539 612 540 613 } … … 562 635 { 563 636 VssRayContainer contributingRays; 564 mVssRays.GetContributingRays(contributingRays, mPass);637 mVssRays.GetContributingRays(contributingRays, 0); 565 638 mStats<<"#NUM_CONTRIBUTING_RAYS\n"<<(int)contributingRays.size()<<endl; 639 if (mExportRays) { 640 char filename[64]; 641 sprintf(filename, "rss-crays-%04d.x3d", 0); 642 ExportRays(filename, contributingRays, mExportNumRays); 643 } 566 644 } 567 645 … … 615 693 VssRayContainer tmpVssRays; 616 694 617 float ratios[] = {0.8f,0.1f,0.1f}; 618 695 static float ratios[] = {0.9f,0.05f,0.05f}; 696 //float ratios[] = {1.0f,0.0f,0.0f}; 697 698 int nrays[3]; 699 float contributions[3]; 700 float times[3]; 701 702 long t1, t2; 703 704 t1 = GetTime(); 705 619 706 GenerateRays(mRssSamplesPerPass*ratios[0], RSS_BASED_DISTRIBUTION, rays); 707 708 rays.NormalizePdf(rays.size()); 709 620 710 CastRays(rays, tmpVssRays); 621 711 castRays += rays.size(); 622 float c1 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 623 mStats<<"#RssRelContrib"<<endl<<c1/rays.size()<<endl; 624 712 #if ADD_RAYS_IN_PLACE 713 contributions[0] = mViewCellsManager->ComputeSampleContributions(tmpVssRays, true, false); 714 #else 715 contributions[0] = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 716 #endif 717 times[0] = TimeDiff(t1, GetTime()); 718 nrays[0] = rays.size(); 719 720 mStats<<"#RssRelContrib"<<endl<<contributions[0]/nrays[0]<<endl; 721 625 722 vssRays.insert(vssRays.end(), tmpVssRays.begin(), tmpVssRays.end() ); 626 723 rays.clear(); 627 724 tmpVssRays.clear(); 628 629 725 if (ratios[1]!=0.0f) { 726 t1 = GetTime(); 630 727 GenerateRays(mRssSamplesPerPass*ratios[1], SPATIAL_BOX_BASED_DISTRIBUTION, rays); 631 728 CastRays(rays, tmpVssRays); 632 729 castRays += rays.size(); 633 float c2 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 634 mStats<<"#SpatialRelContrib"<<endl<<c2/rays.size()<<endl; 730 #if ADD_RAYS_IN_PLACE 731 contributions[1] = mViewCellsManager->ComputeSampleContributions(tmpVssRays, true, false); 732 #else 733 contributions[1] = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 734 #endif 735 times[1] = TimeDiff(t1, GetTime()); 736 nrays[1] = rays.size(); 737 738 mStats<<"#SpatialRelContrib"<<endl<<contributions[1]/nrays[1]<<endl; 635 739 636 740 vssRays.insert(vssRays.end(), tmpVssRays.begin(), tmpVssRays.end() ); … … 642 746 643 747 if (ratios[2]!=0.0f) { 748 t1 = GetTime(); 644 749 GenerateRays(mRssSamplesPerPass*ratios[2], DIRECTION_BASED_DISTRIBUTION, rays); 645 750 CastRays(rays, tmpVssRays); 646 751 castRays += rays.size(); 647 float c3 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 648 mStats<<"#DirectionalRelContrib"<<endl<<c3/rays.size()<<endl; 752 #if ADD_RAYS_IN_PLACE 753 contributions[2] = mViewCellsManager->ComputeSampleContributions(tmpVssRays, true, false); 754 #else 755 contributions[2] = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 756 #endif 757 times[2] = TimeDiff(t1, GetTime()); 758 nrays[2] = rays.size(); 759 760 mStats<<"#DirectionalRelContrib"<<endl<<contributions[2]/nrays[2]<<endl; 649 761 650 762 vssRays.insert(vssRays.end(), tmpVssRays.begin(), tmpVssRays.end() ); … … 654 766 } 655 767 768 769 // now evaluate the ratios for the next pass 770 #define TIMES 0 771 772 #if TIMES 773 ratios[0] = sqr(contributions[0]/times[0]); 774 ratios[1] = sqr(contributions[1]/times[1]); 775 ratios[2] = sqr(contributions[2]/times[2]); 776 #else 777 ratios[0] = sqr(contributions[0]/nrays[0]); 778 ratios[1] = sqr(contributions[1]/nrays[1]); 779 ratios[2] = sqr(contributions[2]/nrays[2]); 780 #endif 781 NormalizeRatios(ratios); 782 783 cout<<"New ratios: "<<ratios[0]<<" "<<ratios[1]<<" "<<ratios[2]<<endl; 784 656 785 // add contributions of all rays at once... 786 #if !ADD_RAYS_IN_PLACE 657 787 mViewCellsManager->AddSampleContributions(vssRays); 658 788 #endif 659 789 } 660 790 else { … … 723 853 sprintf(filename, "rss-rays-%04d.x3d", rssPass); 724 854 855 856 857 vssRays.SelectRays(mExportNumRays, rayBuffer[mPass], true); 858 725 859 ExportRays(filename, vssRays, mExportNumRays); 726 860 727 861 // now export all contributing rays 728 862 VssRayContainer contributingRays; … … 731 865 sprintf(filename, "rss-crays-%04d.x3d", rssPass); 732 866 ExportRays(filename, contributingRays, mExportNumRays); 867 733 868 } 734 869 … … 798 933 799 934 } 800 935 936 937 if (mExportRays && mUseImportanceSampling) { 938 char filename[64]; 939 sprintf(filename, "rss-rays-i.x3d"); 940 941 rayBuffer.resize(mPass); 942 ExportRayAnimation(filename, rayBuffer); 943 } 944 801 945 Debug<<"Deleting RSS tree...\n"; 802 946 delete mRssTree; … … 804 948 805 949 806 // 950 // mViewCellsManager->ExportViewCells("visibility.xml", 807 951 // true); 808 952 -
GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.h
r863 r1112 90 90 ); 91 91 92 bool 93 ExportRayAnimation(const char *filename, 94 const vector<VssRayContainer> &vssRays 95 ); 96 92 97 void 93 98 ExportObjectRays(VssRayContainer &rays, -
GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp
r1004 r1112 333 333 leaf->dirBBox.SetMin(2, 0.0f); 334 334 leaf->dirBBox.SetMax(2, 1.0f); 335 336 335 mRoots[i] = leaf; 337 336 } 337 338 338 // init spatial bounding boxes 339 339 for (i = 0; i < objects.size(); i++) { … … 366 366 367 367 // leaf bbox contains bbox of origins only 368 369 // include both origin and terminatin in the global bbox 370 #if USE_ORIGIN 368 371 leaf->bbox.Include((*ri)->GetOrigin()); 369 370 // include both origin and terminatin in the global bbox371 372 bbox.Include((*ri)->GetOrigin()); 373 #else 372 374 bbox.Include((*ri)->GetTermination()); 373 375 leaf->bbox.Include((*ri)->GetTermination()); 376 #endif 374 377 Vector3 dVec = Vector3( 375 378 (*ri)->GetDirParametrization(0), … … 396 399 for (int i=0; i < mRoots.size(); i++) { 397 400 RssTreeLeaf *leaf = (RssTreeLeaf *)mRoots[i]; 401 UpdatePvsSize(leaf); 398 402 stat.initialPvsSize += leaf->GetPvsSize(); 399 UpdatePvsSize(leaf);400 403 mRoots[i] = Subdivide(TraversalData(leaf, GetBBox(leaf), 0)); 401 404 } … … 458 461 if (!node->IsLeaf()) { 459 462 subdivided++; 460 463 461 464 462 465 RssTreeInterior *interior = (RssTreeInterior *) node; … … 626 629 case 1: { 627 630 float newContrib = 628 info.contributionBack/(info.position - minBox) + 629 + 630 info.contributionFront/(maxBox - info.position); 631 float oldContrib = info.contribution/sizeBox; 632 info.costRatio = oldContrib/newContrib; 631 (info.contributionBack*(info.position - minBox) + 632 + 633 info.contributionFront*(maxBox - info.position))/sizeBox; 634 float oldContrib = info.contribution; 635 info.costRatio = newContrib/oldContrib; 636 // cout<<info.contribution<<" "<<info.contributionBack<<" "<<info.contributionFront<<endl; 633 637 break; 634 638 } … … 757 761 } 758 762 759 info.contribution = sumContribution/sumWeights; 760 info.contributionBack = sumContributionBack/sumWeightsBack; 761 info.contributionFront = sumContributionFront/sumWeightsFront; 763 if (sumWeights!=0.0f) 764 info.contribution = sumContribution/sumWeights; 765 else 766 info.contribution = 0.0f; 767 768 if (sumWeightsBack!=0.0f) 769 info.contributionBack = sumContributionBack/sumWeightsBack; 770 else 771 info.contributionBack = 0.0f; 772 773 if (sumWeightsFront!=0.0f) 774 info.contributionFront = sumContributionFront/sumWeightsFront; 775 else 776 info.contributionFront = 0.0f; 762 777 763 778 GetCostRatio( … … 765 780 info); 766 781 767 // 782 //cout<<axis<<" "<<pvsSize<<" "<<pvsBack<<" "<<pvsFront<<endl; 768 783 // float oldCost = leaf->rays.size(); 769 784 770 // 785 // cout<<"ratio="<<ratio<<endl; 771 786 } 772 787 … … 2054 2069 2055 2070 2056 const float smoothRange = 0. 0f;2071 const float smoothRange = 0.1f; 2057 2072 if (smoothRange != 0.0f) { 2058 2073 box.Scale(1.0f + smoothRange); … … 2078 2093 } 2079 2094 2080 int numberOfTries = numberOfRays*4; 2095 // int numberOfTries = numberOfRays*4; 2096 int numberOfTries = numberOfRays; 2081 2097 int generated = 0; 2082 2098 … … 2104 2120 2105 2121 float extendedConvexCombinationProb = 0.0f; //0.7f 2106 float silhouetteCheckPercentage = 1.0f; //0.5f 2122 // float silhouetteCheckPercentage = 1.0f; //0.5f 2123 float silhouetteCheckPercentage = 0.0f; //0.9f; // 0.5f; 2124 float silhouetteObjectCheckPercentage = 0.8f; 2107 2125 for (int i=0; generated < numberOfRays && i < numberOfTries; i++) { 2108 2126 bool useExtendedConvexCombination = ((nrays >= 2) && (Random(1.0f) < … … 2179 2197 bool intersects = false; 2180 2198 2181 2182 if (i > numberOfRays*(1.0f - silhouetteCheckPercentage)) { 2199 if (i >= numberOfRays*(1.0f - silhouetteCheckPercentage)) { 2183 2200 if (exporter) { 2184 2201 VssRay *ray = new VssRay(origin, origin + 100*direction, NULL, NULL); … … 2194 2211 Intersectable *object = *oi; 2195 2212 // do not test every object 2196 if (Random(1.0f) > 0.5f) 2197 break; 2198 if ( object->CastRay(traversalRay) ) { 2213 if ( Random(1.0f) <= silhouetteObjectCheckPercentage && 2214 object->CastRay(traversalRay) ) { 2199 2215 intersects = true; 2200 2216 break; … … 2211 2227 } 2212 2228 2213 2214 2229 // cout<<"desired="<<numberOfRays<<" tries="<<i<<endl; 2215 2230 // assign pdfs to the generated rays 2216 float p = 1.0f; //(box.GetVolume()*dirBox.GetVolume())/i; 2217 rays.mSumPdf = 0.0f; 2231 // float density = generated/(box.SurfaceArea()*dirBox.GetVolume()); 2232 float density = 1.0f; 2233 2234 float p = 1.0f/density; //(box.GetVolume()*dirBox.GetVolume())/i; 2218 2235 for (i=startIndex; i < rays.size(); i++) { 2219 2236 rays[i].mPdf = p; 2220 rays.mSumPdf += p;2221 2237 } 2222 2238 … … 2227 2243 CLEAR_CONTAINER(selectedRays); 2228 2244 } 2229 2230 2245 2231 2246 } … … 2316 2331 if (leaf->rays[i].mRay->RefCount() != 0) { 2317 2332 cerr<<"Error: refcount!=0, but"<<leaf->rays[i].mRay->RefCount()<<endl; 2333 cerr<<"desired="<<desired<<"i="<<i<<" size="<<leaf->rays.size()<<endl; 2318 2334 exit(1); 2319 2335 } … … 2412 2428 CollectLeaves(leaves); 2413 2429 2414 sort(leaves.begin(), 2415 leaves.end(), 2416 GreaterContribution); 2430 if (numberOfLeaves != leaves.size()) 2431 sort(leaves.begin(), 2432 leaves.end(), 2433 GreaterContribution); 2417 2434 2418 2435 … … 2431 2448 2432 2449 // always generate at leat n ray per leaf 2433 int fixedPerLeaf = 1; 2434 int fixed = 1*leaves.size(); 2450 int fixedPerLeaf = 0; 2451 // int fixedPerLeaf = 0; 2452 int fixed = fixedPerLeaf*leaves.size(); 2435 2453 int iGenerated = numberOfRays; 2436 2454 float ratioPerLeaf = iGenerated /(avgContrib*numberOfLeaves); … … 2485 2503 // if 1.0f then weighs = 1 1/2 1/3 1/4 2486 2504 float passSampleWeightDecay = 1.0f; 2487 2488 void 2489 RssTree::GetRayContribution(const RssTreeNode::RayInfo &info, 2490 float &weight, 2491 float &contribution) 2492 { 2493 VssRay *ray = info.mRay; 2494 weight = 1.0f/(mCurrentPass - ray->mPass + passSampleWeightDecay); 2495 contribution = 2496 weightAbsContributions*ray->mPvsContribution + 2497 (1.0f - weightAbsContributions)*ray->mRelativePvsContribution; 2498 // store the computed value 2499 info.mRay->mWeightedPvsContribution = weight*contribution; 2500 } 2505 //float passSampleWeightDecay = 0.0001f; 2506 2501 2507 2502 2508 float … … 2506 2512 float weight; 2507 2513 if (1) 2508 weight = 1.0f/ (passDiff + passSampleWeightDecay);2514 weight = 1.0f/sqr(passDiff + passSampleWeightDecay); 2509 2515 else 2510 2516 switch (passDiff) { 2511 case 0: 2517 // case 0: 2518 // weight = 1.0f; 2519 // break; 2520 default: 2512 2521 weight = 1.0f; 2513 break;2514 default:2515 weight = 0.0f;2516 2522 break; 2517 2523 // case 1: … … 2535 2541 2536 2542 void 2543 RssTree::GetRayContribution(const RssTreeNode::RayInfo &info, 2544 float &weight, 2545 float &contribution) 2546 { 2547 VssRay *ray = info.mRay; 2548 weight = GetSampleWeight(mCurrentPass); 2549 contribution = 2550 weightAbsContributions*ray->mPvsContribution + 2551 (1.0f - weightAbsContributions)*ray->mRelativePvsContribution; 2552 // store the computed value 2553 info.mRay->mWeightedPvsContribution = weight*contribution; 2554 } 2555 2556 2557 void 2537 2558 RssTree::ComputeImportance(RssTreeLeaf *leaf) 2538 2559 { … … 2553 2574 sumRelContributions += weight*ray->mRelativePvsContribution; 2554 2575 2555 // 2576 //sumWeights += weight; 2556 2577 sumWeights += 1.0f; 2557 2578 } … … 2576 2597 RssTreeLeaf::GetImportance() const 2577 2598 { 2599 //return sqr(mImportance); 2578 2600 return mImportance; 2579 2601 } -
GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.h
r863 r1112 162 162 } 163 163 164 #define USE_ORIGIN 0164 #define USE_ORIGIN 1 165 165 166 166 Vector3 GetOrigin() const { -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp
r1004 r1112 87 87 } 88 88 89 // void90 // SamplingPreprocessor::AvsGenerateRandomRay(Ray &ray)91 // {92 // int objId = RandomValue(0, mObjects.size());93 // Intersectable *object = objects[objId];94 // object->GetRandomSurfacePoint(point, normal);95 // direction = UniformRandomVector(normal);96 // SetupRay(ray, point, direction);97 // }98 99 // void100 // SamplingPreprocessor::AvsHandleRay(Ray &ray)101 // {102 // int sampleContributions = 0;103 104 // mKdTree->CastRay(ray);105 106 // if (ray.leaves.size()) {107 // sampleContributions += AddNodeSamples(object, ray, pass);108 109 // if (ray.intersections.size()) {110 // sampleContributions += AddNodeSamples(ray.intersections[0].mObject, ray, pass);111 // }112 // }113 // }114 115 // void116 // SamplingPreprocessor::AvsBorderSampling(Ray &ray)117 // {118 119 120 // }121 122 // void123 // SamplingPreprocessor::AvsPass()124 // {125 // Ray ray;126 // while (1) {127 // AvsGenerateRay(ray);128 // HandleRay(ray);129 // while ( !mRayQueue.empty() ) {130 // Ray ray = mRayQueue.pop();131 // mRayQueue.pop();132 // AdaptiveBorderSampling(ray);133 // }134 // }135 136 137 138 // }139 89 140 90 -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1108 r1112 720 720 << " max=\"" << mViewSpaceBox.Max().x << " " << mViewSpaceBox.Max().y << " " << mViewSpaceBox.Max().z << "\" />" << endl; 721 721 722 722 if (exportPvs) { 723 723 //-- export bounding boxes 724 724 stream << "<BoundingBoxes>" << endl; … … 738 738 739 739 stream << "</BoundingBoxes>" << endl; 740 740 } 741 741 742 742 //-- export the view cells and the pvs … … 1222 1222 const float filterWidth) 1223 1223 { 1224 1225 1226 1227 1228 ViewCell *currentViewCell = GetViewCell(viewPoint); 1229 1230 if (mMaxFilterSize < 1) { 1231 prvs.mViewCell = currentViewCell; 1232 return; 1233 } 1234 1224 1235 const AxisAlignedBox3 box = GetFilterBBox(viewPoint, filterWidth); 1225 1226 ViewCell *currentViewCell = GetViewCell(viewPoint); 1227 1236 1228 1237 if (currentViewCell) { 1229 1238 ViewCellContainer viewCells; 1230 1239 ComputeBoxIntersections(box, viewCells); 1231 1240 1241 1232 1242 ViewCell *root = ConstructLocalMergeTree2(currentViewCell, viewCells); 1233 1243 prvs.mViewCell = root; 1244 1234 1245 } else 1235 1246 prvs.mViewCell = NULL; … … 1674 1685 void ViewCellsManager::GetPvsStatistics(PvsStatistics &stat) 1675 1686 { 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 { 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 } 1700 1701 1702 1687 // update pvs of view cells tree if necessary 1688 UpdatePvs(); 1689 1690 ViewCellContainer::const_iterator it = mViewCells.begin(); 1691 1692 stat.viewcells = 0; 1693 stat.minPvs = 100000000; 1694 stat.maxPvs = 0; 1695 stat.avgPvs = 0.0f; 1696 1697 for (; it != mViewCells.end(); ++ it) 1698 { 1699 ViewCell *viewcell = *it; 1700 1701 const int pvsSize = mViewCellsTree->GetPvsSize(viewcell); 1702 1703 if (pvsSize < stat.minPvs) 1704 stat.minPvs = pvsSize; 1705 if (pvsSize > stat.maxPvs) 1706 stat.maxPvs = pvsSize; 1707 stat.avgPvs += pvsSize; 1708 1709 ++ stat.viewcells; 1710 } 1711 1712 if (stat.viewcells) 1713 stat.avgPvs/=stat.viewcells; 1703 1714 } 1704 1715 … … 1869 1880 // if ray not outside of view space 1870 1881 float contribution; 1871 if (ray.mTerminationObject && 1872 viewcell->GetPvs().GetSampleContribution(ray.mTerminationObject, 1873 ray.mPdf, 1874 contribution)) 1875 { 1882 if (ray.mTerminationObject) { 1883 if (viewcell->GetPvs().GetSampleContribution(ray.mTerminationObject, 1884 ray.mPdf, 1885 contribution)) 1876 1886 ++ ray.mPvsContribution; 1877 1887 ray.mRelativePvsContribution += contribution; 1878 1888 } 1879 1880 1889 // for directional sampling it is important to count only contributions 1881 1890 // made in one direction!!! -
GTP/trunk/Lib/Vis/Preprocessing/src/VrmlExporter.h
r1106 r1112 113 113 const RgbColor &color = RgbColor(1,1,1)); 114 114 115 virtual bool 116 ExportRaySets(const vector<VssRayContainer> &rays, 117 const RgbColor &color) { return false; } 118 115 119 virtual void 116 120 ExportBspSplitPlanes(const BspTree &tree); -
GTP/trunk/Lib/Vis/Preprocessing/src/VspKdTree.h
r1012 r1112 35 35 #include "ViewCell.h" 36 36 37 38 namespace GtpVisibilityPreprocessor { 39 37 40 class VspKdLeaf; 38 41 class ViewCellsManager; 39 42 class ViewCellsStatistics; 40 41 namespace GtpVisibilityPreprocessor {42 43 43 44 /** -
GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.cpp
r863 r1112 230 230 int 231 231 VssRayContainer::SelectRays(const int number, 232 VssRayContainer &selected) const 232 VssRayContainer &selected, 233 const bool copy) const 233 234 { 234 235 float p = number/(float)size(); … … 236 237 237 238 for (; it != end(); it++) 238 if (Random(1.0f) < p) 239 selected.push_back(*it); 239 if (Random(1.0f) < p) { 240 if (!copy) 241 selected.push_back(*it); 242 else 243 selected.push_back(new VssRay(**it)); 244 } 240 245 241 246 return (int)selected.size(); … … 249 254 { 250 255 VssRayContainer::const_iterator it = begin(); 251 256 // ofstream s("contrib.log"); 252 257 for (; it != end(); it++) { 253 258 VssRay *ray = *it; 259 // s<<"(pass="<<ray->mPass<<", c="<<ray->mPvsContribution<<")"<<endl; 254 260 if (ray->mPass >= minPass && ray->mPvsContribution > 0) 255 261 selected.push_back(ray); -
GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.h
r863 r1112 220 220 bool HasPosDir(const int axis) const { return mFlags & (1<<axis); } 221 221 222 char Flags() const { return mFlags;} 223 void SetFlags(char orFlag) { mFlags |= orFlag;} 222 char Flags() const { return mFlags;} void SetFlags(char orFlag) { mFlags |= orFlag;} 224 223 225 224 bool IsActive() const { return mRefCount>0; } … … 312 311 { 313 312 void PrintStatistics(ostream &s); 314 int SelectRays(const int number, VssRayContainer &selected ) const;313 int SelectRays(const int number, VssRayContainer &selected, const bool copy=false) const; 315 314 int 316 315 GetContributingRays(VssRayContainer &selected, -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dExporter.cpp
r1107 r1112 35 35 36 36 37 37 38 bool 38 39 X3dExporter::ExportRays(const RayContainer &rays, … … 83 84 84 85 return true; 86 } 87 88 89 bool 90 X3dExporter::ExportRaySets(const vector<VssRayContainer> &rays, 91 const RgbColor &color) 92 { 93 vector<VssRayContainer>::const_iterator ri = rays.begin(); 94 95 stream<<"<Switch DEF=\"RAYS\" whichChoice=\"0\" >"<<endl; 96 97 bool result = false; 98 99 for (; ri != rays.end(); ri++) { 100 result = ExportRays(*ri, color); 101 if (!result) { 102 cerr<<"Error while exporting rays!\n"; 103 break; 104 } 105 } 106 107 stream<<"</Switch>"<<endl; 108 109 stream<<"<TimeSensor DEF='TIMER' loop='true' startTime='0' stopTime='0' cycleInterval='5'>" 110 <<endl; 111 stream<<"</TimeSensor>"<<endl; 112 113 stream<<"<IntegerSequencer DEF='SEQ'"<<endl; 114 stream<<"key='0.0 "; 115 int i; 116 int size = rays.size() + 2; 117 for (i=1; i < size; i++) { 118 stream<<i/(float)(size-1)<<" "; 119 } 120 stream<<"'\n"; 121 122 stream<<"keyValue='"; 123 for (i=0; i < size; i++) { 124 stream<<i<<" "; 125 } 126 stream<<"'>\n"; 127 128 stream<<"</IntegerSequencer>"<<endl; 129 130 stream<< 131 "<ROUTE fromNode='TIMER' fromField='fraction_changed' toNode='SEQ' toField='set_fraction'>"; 132 stream<<"</ROUTE>"<<endl; 133 134 stream<<"<ROUTE fromNode='SEQ' fromField='value_changed' toNode='RAYS' toField='set_whichChoice'>"; 135 136 stream<<"</ROUTE>"<<endl; 137 138 return result; 85 139 } 86 140 … … 1262 1316 1263 1317 } 1318 -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dExporter.h
r1106 r1112 128 128 virtual void ExportBeam(const Beam &beam, const AxisAlignedBox3 &box); 129 129 130 bool 131 ExportRaySets(const vector<VssRayContainer> &rays, 132 const RgbColor &color); 133 130 134 protected: 131 135 -
GTP/trunk/Lib/Vis/Preprocessing/src/common.h
r971 r1112 484 484 485 485 // if the view cells should be exported and inported as gzstream 486 #define ZIPPED_VIEWCELLS 1487 488 #endif 489 490 491 492 493 494 495 496 497 498 499 486 #define ZIPPED_VIEWCELLS 0 487 488 #endif 489 490 491 492 493 494 495 496 497 498 499 -
GTP/trunk/Lib/Vis/Preprocessing/src/default.env
r904 r1112 14 14 # filename ../data/vienna/viewcells-25-sel.x3d 15 15 #filename ../data/atlanta/atlanta2.x3d 16 # filename ../data/soda/soda.dat17 filename ../data/soda/soda5.dat16 # filename ../data/soda/soda.dat 17 #filename ../data/soda/soda5.dat 18 18 #filename ../data/PowerPlant/ppsection1/part_a/g0.ply 19 19 #filename ../data/PowerPlant/ppsection1/part_b/g0.ply … … 22 22 #filename ../data/PowerPlant/selection3.plb 23 23 #filename ../data/PowerPlant/section10.plb;../data/PowerPlant/section14.plb 24 #filename ../data/PowerPlant/selection.plb24 filename ../data/PowerPlant/selection.plb 25 25 #filename ../data/PowerPlant/comps/ppsection1/comps.plb 26 26 } … … 35 35 type rss 36 36 # type render 37 detectEmptyViewSpace false38 pvsRenderErrorSamples 039 # pvsRenderErrorSamples 100040 quitOnFinish false37 detectEmptyViewSpace true 38 # pvsRenderErrorSamples 0 39 pvsRenderErrorSamples 5000 40 quitOnFinish true 41 41 computeVisibility true 42 applyVisibilityFilter 43 applyVisibilitySpatialFilter true42 applyVisibilityFilter false 43 applyVisibilitySpatialFilter false 44 44 visibilityFilterWidth 0.01 45 45 visibilityFile visibility.xml 46 loadPolygonsAsMeshes false 46 47 } 47 48 … … 53 54 VssPreprocessor { 54 55 samplesPerPass 100000 55 initialSamples 50000056 vssSamples 500000057 vssSamplesPerPass 50000056 initialSamples 100000 57 vssSamples 1000000 58 vssSamplesPerPass 100000 58 59 useImportanceSampling true 59 60 loadInitialSamples false … … 72 73 minRays 100 73 74 minSize 0.001 74 maxCostRatio 1.575 maxCostRatio 2.0 75 76 maxRayContribution 0.5 76 77 … … 79 80 80 81 # splitType regular 81 #splitType heuristic82 splitType hybrid82 splitType heuristic 83 # splitType hybrid 83 84 splitUseOnlyDrivingAxis true 84 85 … … 94 95 95 96 RssPreprocessor { 96 samplesPerPass 50000097 samplesPerPass 1000 97 98 initialSamples 1000000 98 vssSamples 5000000 99 vssSamples 500000000 99 100 vssSamplesPerPass 1000000 100 101 useImportanceSampling true … … 106 107 pvs false 107 108 rssTree false 108 rays false109 numRays 2000 0109 rays true 110 numRays 2000 110 111 } 111 112 … … 121 122 perObjectTree false 122 123 123 maxDepth 40124 minPvs 3124 maxDepth 60 125 minPvs 1 125 126 # before vienna test it was: 126 127 # minRays 50 127 128 # splitType heuristic 128 129 129 minRays 100130 minRays 200 130 131 minSize 0.001 131 maxCostRatio 1.0132 maxCostRatio 0.98 132 133 maxRayContribution 0.5 133 maxRays 2000000134 maxRays 4000000 134 135 maxTotalMemory 200 135 136 maxStaticMemory 100 136 137 137 splitType regular138 #splitType heuristic138 # splitType regular 139 splitType heuristic 139 140 # splitType hybrid 140 141 splitUseOnlyDrivingAxis false … … 165 166 maxCostRatio 1.0 166 167 ct_div_ci 0.5 167 maxNodes 100000168 maxNodes 200000 168 169 169 170 #500000 … … 211 212 maxStaticMemory 40 212 213 213 exportToFile false214 exportToFile true 214 215 loadFromFile true 215 216 … … 280 281 # filename ../data/soda/soda5-viewcells.xml 281 282 # filename ../scripts/viewcells_atlanta.xml 282 filename ../data/soda/soda5-viewcells2.xml 283 # filename ../data/soda/soda5-viewcells2.xml 284 285 # filename ../data/soda/soda5-viewcell-single.xm 286 # filename ../data/soda/vienna-viewcell-single.xml 287 288 283 289 # filename ../data/atlanta/viewcells_atlanta3.xml 284 290 # filename ../data/vienna/viewcells_vienna.xml 285 291 # filename ../data/vienna/viewcells_vienna2.xml 286 292 # filename ../data/vienna/vienna_simple-21-04-avs2-viewCells.xml 287 # filename ../data/PowerPlant/power_plant_viewcells_all3.xml293 filename ../data/PowerPlant/power_plant_viewcells1.xml 288 294 } 289 295 … … 385 391 minGlobalCostRatio 0.0000001 386 392 # minGlobalCostRatio 0.0001 387 maxViewCells 50000 393 # $$MAXVIEWCELLS 394 maxViewCells 5000 388 395 389 396 -
GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
r1076 r1112 30 30 { 31 31 32 //Now just call this function at the start of your program and if you're 33 //compiling in debug mode (F5), any leaks will be displayed in the Output 34 //window when the program shuts down. If you're not in debug mode this will 35 //be ignored. Use it as you will! 36 //note: from GDNet Direct [3.8.04 - 3.14.04] void detectMemoryLeaks() { 37 _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF|_CRTDBG_ALLOC_MEM_DF); 38 _CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE); 39 _CrtSetReportFile(_CRT_ASSERT,_CRTDBG_FILE_STDERR); 32 //Now just call this function at the start of your program and if you're 33 //compiling in debug mode (F5), any leaks will be displayed in the Output 34 //window when the program shuts down. If you're not in debug mode this will 35 //be ignored. Use it as you will! 36 //note: from GDNet Direct [3.8.04 - 3.14.04] void detectMemoryLeaks() { 37 _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF|_CRTDBG_ALLOC_MEM_DF); 38 _CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE); 39 _CrtSetReportFile(_CRT_ASSERT,_CRTDBG_FILE_STDERR); 40 41 InitTiming(); 40 42 41 43 Debug.open("debug.log"); … … 136 138 rendererWidget->show(); 137 139 138 if ( p->GetRenderer()) {140 if (0 && p->GetRenderer()) { 139 141 140 142 cout<<"CONNECTING"<<endl; … … 142 144 SIGNAL(UpdatePvsErrorItem(int i, 143 145 GlRendererBuffer::PvsErrorEntry &)), 144 146 145 147 rendererWidget->mControlWidget, 146 148 SLOT(UpdatePvsErrorItem(int i, -
GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
r811 r1112 13 13 14 14 15 win32:LIBPATH += $$NONGTP/Xerces/xerces/lib $$NONGTP/Devil/lib "d:/Programs/NVIDIA Corporation/Cg/lib" 15 win32:LIBPATH += GL $$NONGTP/Xerces/xerces/lib $$NONGTP/Devil/lib \ 16 "d:/Programs/NVIDIA Corporation/Cg/lib" $$NONGTP/glut 17 16 18 unix:LIBPATH += ../support/src/xerces-c-src_2_7_0/lib ../support/devil/lib /usr/lib/qt3/lib64 17 19 … … 28 30 QT += opengl 29 31 30 win32:LIBS += xerces-c_2.lib devil.lib ilu.lib ilut.lib cg.lib cgGL.lib 32 win32:LIBS += xerces-c_2.lib devil.lib ilu.lib ilut.lib cg.lib cgGL.lib glew32.lib 33 31 34 unix:LIBS += -lxerces-c -lIL -lILU -lILUT 32 35 … … 44 47 MutualVisibility.cpp Triangle3.cpp Rectangle3.cpp Plane3.cpp Polygon3.cpp \ 45 48 ViewCell.cpp ViewCellBsp.cpp Halton.cpp VssRay.cpp VssTree.cpp VssPreprocessor.cpp \ 46 RenderSimulator.cpp VspKdTree.cppRayInfo.cpp RssTree.cpp RssPreprocessor.cpp \49 RenderSimulator.cpp RayInfo.cpp RssTree.cpp RssPreprocessor.cpp \ 47 50 ViewCellsManager.cpp VspBspTree.cpp GlRenderer.cpp \ 48 51 PreprocessorThread.cpp Renderer.cpp Beam.cpp ViewCellsParser.cpp Tetrahedron3.cpp \ 49 VrmlExporter.cpp PlyParser.cpp plyfile.c RenderSampler.cpp 52 VrmlExporter.cpp PlyParser.cpp plyfile.c RenderSampler.cpp \ 53 GzBinFileInputStream.cpp GzFileInputSource.cpp \ 54 OcclusionQuery.cpp VspOspTree.cpp LogManager.cpp \ 55 SamplingStrategy.cpp 50 56 57 #VspKdTree.cpp ResourceManager.cpp
Note: See TracChangeset
for help on using the changeset viewer.