Changeset 2695


Ignore:
Timestamp:
05/22/08 14:07:56 (16 years ago)
Author:
mattausch
Message:

debug version: problematic view points for vienna detected

Location:
GTP/trunk/Lib/Vis/Preprocessing
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/gvs.env

    r2687 r2695  
    9999 
    100100        Termination { 
    101                 minCost 0 
    102                 maxDepth 20 
    103                  
    104                 maxCostRatio 1.5 
     101                minCost 1 
     102                maxDepth 30 
     103                maxCostRatio 0.98 
    105104                ct_div_ci 0.5 
     105                maxNodes 100000 
     106 
     107                #minCost 0 
     108                #maxDepth 20 
     109                 
     110                #maxCostRatio 1.5 
     111                #ct_div_ci 0.5 
    106112        } 
    107113 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_vienna

    r2694 r2695  
    88 
    99 
    10 SCENE=../data/vienna/vienna_cropped.obj 
    11 #SCENE=../data/vienna/city_full.obj 
     10#SCENE=../data/vienna/vienna_cropped.obj 
     11SCENE=../data/vienna/city_full.obj 
    1212 
    1313VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz 
     
    3636-preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \ 
    3737-preprocessor_stats=$PREFIX-i-mixed-b1-n4a.log \ 
    38 -preprocessor_detect_empty_viewspace- \ 
     38-preprocessor_detect_empty_viewspace+ \ 
    3939-preprocessor_use_vbos- \ 
    4040-preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4a.hlog \ 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vps.sh

    r2694 r2695  
    77TARGET=release 
    88 
    9 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -samples_per_evaluation=10000000 -total_samples=250000000 -preprocessor_pvs_rendererror_samples=100000 -preprocessor_evaluatePixelError+ -preprocessor_detect_empty_viewspace+ -kd_pvs_area=1e-4 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ -view_cells_import_random_viewcells+ -view_cells_export_random_viewcells-"  
     9COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -samples_per_evaluation=10000000 -total_samples=250000000 -preprocessor_pvs_rendererror_samples=100000 -preprocessor_evaluatePixelError+ -preprocessor_detect_empty_viewspace- -kd_pvs_area=1e-4 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ -view_cells_import_random_viewcells+ -view_cells_export_random_viewcells-"  
    1010 
    1111echo "starting $TARGET version" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp

    r2690 r2695  
    125125                mViewPoint = Vector3(680.682, 189.552, -278.177); 
    126126                mViewDirection = Vector3(0.942709, -0, -0.333584); 
     127 
     128                // strange error for gvs 
     129                mViewPoint = Vector3(1186.9, 193.552, -377.044); 
     130                mViewDirection = Vector3(-0.963031, -0, -0.269365); 
     131 
     132                mViewPoint = Vector3(1189.54, 220.087, -462.869); 
     133                mViewDirection = Vector3(-0.996972, -0, -0.0776569); 
    127134        } 
    128135 
     
    194201        glPushAttrib(GL_CURRENT_BIT); 
    195202 
    196         if (mUseFalseColors) 
    197                 SetupFalseColor(object->mId); 
     203        if (mUseFalseColors) SetupFalseColor(object->mId); 
    198204 
    199205        switch (object->Type())  
     
    18821888                TriangleIntersectable *obj = static_cast<TriangleIntersectable *>(leaf->mGeometry[i]); 
    18831889 
    1884                 if (obj->GetId() != i) 
    1885                         cerr << "****\n****riesenfehler" << endl; 
    18861890                Triangle3 tri = obj->GetItem(); 
    18871891                const Vector3 n = tri.GetNormal(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GtpVisibility05.vcproj

    r2680 r2695  
    202202        <Files> 
    203203                <Filter 
     204                        Name="Header Files" 
     205                        Filter="h;hpp;hxx;hm;inl;inc;xsd" 
     206                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" 
     207                        > 
     208                        <File 
     209                                RelativePath=".\AxisAlignedBox3.h" 
     210                                > 
     211                        </File> 
     212                        <File 
     213                                RelativePath=".\Beam.h" 
     214                                > 
     215                        </File> 
     216                        <File 
     217                                RelativePath=".\Timer\BenchTimer.h" 
     218                                > 
     219                        </File> 
     220                        <File 
     221                                RelativePath=".\BitVectorPvs.h" 
     222                                > 
     223                        </File> 
     224                        <File 
     225                                RelativePath=".\BoostPreprocessorThread.h" 
     226                                > 
     227                        </File> 
     228                        <File 
     229                                RelativePath=".\BoundingBoxConverter.h" 
     230                                > 
     231                        </File> 
     232                        <File 
     233                                RelativePath=".\BvHierarchy.h" 
     234                                > 
     235                        </File> 
     236                        <File 
     237                                RelativePath=".\Camera.h" 
     238                                > 
     239                        </File> 
     240                        <File 
     241                                RelativePath=".\common.h" 
     242                                > 
     243                        </File> 
     244                        <File 
     245                                RelativePath=".\havran\configh.h" 
     246                                > 
     247                        </File> 
     248                        <File 
     249                                RelativePath=".\Containers.h" 
     250                                > 
     251                        </File> 
     252                        <File 
     253                                RelativePath=".\DifferenceSampling.h" 
     254                                > 
     255                        </File> 
     256                        <File 
     257                                RelativePath=".\Environment.h" 
     258                                > 
     259                        </File> 
     260                        <File 
     261                                RelativePath=".\ExactPreprocessor.h" 
     262                                > 
     263                        </File> 
     264                        <File 
     265                                RelativePath=".\Exporter.h" 
     266                                > 
     267                        </File> 
     268                        <File 
     269                                RelativePath=".\FilterBasedDistribution.cpp" 
     270                                > 
     271                        </File> 
     272                        <File 
     273                                RelativePath=".\FilterBasedDistribution.h" 
     274                                > 
     275                        </File> 
     276                        <File 
     277                                RelativePath=".\FlexibleHeap.h" 
     278                                > 
     279                        </File> 
     280                        <File 
     281                                RelativePath=".\GzBinFileInputStream.h" 
     282                                > 
     283                        </File> 
     284                        <File 
     285                                RelativePath=".\GzFileInputSource.h" 
     286                                > 
     287                        </File> 
     288                        <File 
     289                                RelativePath=".\gzstream.h" 
     290                                > 
     291                        </File> 
     292                        <File 
     293                                RelativePath=".\Halton.h" 
     294                                > 
     295                        </File> 
     296                        <File 
     297                                RelativePath=".\HashPvs.h" 
     298                                > 
     299                        </File> 
     300                        <File 
     301                                RelativePath=".\HavranRayCaster.h" 
     302                                > 
     303                        </File> 
     304                        <File 
     305                                RelativePath=".\HierarchyManager.h" 
     306                                > 
     307                        </File> 
     308                        <File 
     309                                RelativePath=".\IntelRayCaster.h" 
     310                                > 
     311                        </File> 
     312                        <File 
     313                                RelativePath=".\InternalRayCaster.h" 
     314                                > 
     315                        </File> 
     316                        <File 
     317                                RelativePath=".\Intersectable.h" 
     318                                > 
     319                        </File> 
     320                        <File 
     321                                RelativePath=".\IntersectableWrapper.h" 
     322                                > 
     323                        </File> 
     324                        <File 
     325                                RelativePath=".\IntersectionBoundingBoxConverter.h" 
     326                                > 
     327                        </File> 
     328                        <File 
     329                                RelativePath=".\KdTree.h" 
     330                                > 
     331                        </File> 
     332                        <File 
     333                                RelativePath=".\LogManager.h" 
     334                                > 
     335                        </File> 
     336                        <File 
     337                                RelativePath=".\Mailable.h" 
     338                                > 
     339                        </File> 
     340                        <File 
     341                                RelativePath=".\Material.h" 
     342                                > 
     343                        </File> 
     344                        <File 
     345                                RelativePath=".\Matrix4x4.h" 
     346                                > 
     347                        </File> 
     348                        <File 
     349                                RelativePath=".\Timer\merror.h" 
     350                                > 
     351                        </File> 
     352                        <File 
     353                                RelativePath=".\Mesh.h" 
     354                                > 
     355                        </File> 
     356                        <File 
     357                                RelativePath=".\MeshKdTree.h" 
     358                                > 
     359                        </File> 
     360                        <File 
     361                                RelativePath=".\Timer\mstring.h" 
     362                                > 
     363                        </File> 
     364                        <File 
     365                                RelativePath=".\Mutation.h" 
     366                                > 
     367                        </File> 
     368                        <File 
     369                                RelativePath=".\MutualVisibility.h" 
     370                                > 
     371                        </File> 
     372                        <File 
     373                                RelativePath=".\ObjectPvs.h" 
     374                                > 
     375                        </File> 
     376                        <File 
     377                                RelativePath=".\ObjExporter.h" 
     378                                > 
     379                        </File> 
     380                        <File 
     381                                RelativePath=".\OcclusionQuery.h" 
     382                                > 
     383                        </File> 
     384                        <File 
     385                                RelativePath=".\OspTree.h" 
     386                                > 
     387                        </File> 
     388                        <File 
     389                                RelativePath=".\Parser.h" 
     390                                > 
     391                        </File> 
     392                        <File 
     393                                RelativePath=".\Timer\PerfTimer.h" 
     394                                > 
     395                        </File> 
     396                        <File 
     397                                RelativePath=".\Timer\PerfTimerSkeleton.h" 
     398                                > 
     399                        </File> 
     400                        <File 
     401                                RelativePath=".\Plane3.h" 
     402                                > 
     403                        </File> 
     404                        <File 
     405                                RelativePath=".\ply.h" 
     406                                > 
     407                        </File> 
     408                        <File 
     409                                RelativePath=".\PlyParser.h" 
     410                                > 
     411                        </File> 
     412                        <File 
     413                                RelativePath=".\Polygon3.h" 
     414                                > 
     415                        </File> 
     416                        <File 
     417                                RelativePath=".\Polytope.h" 
     418                                > 
     419                        </File> 
     420                        <File 
     421                                RelativePath=".\PreprocessorThread.h" 
     422                                > 
     423                        </File> 
     424                        <File 
     425                                RelativePath=".\Pvs.h" 
     426                                > 
     427                        </File> 
     428                        <File 
     429                                RelativePath=".\PvsBase.h" 
     430                                > 
     431                        </File> 
     432                        <File 
     433                                RelativePath=".\PvsDefinitions.h" 
     434                                > 
     435                        </File> 
     436                        <File 
     437                                RelativePath=".\RandomViewCellsHandler.h" 
     438                                > 
     439                        </File> 
     440                        <File 
     441                                RelativePath=".\Ray.h" 
     442                                > 
     443                        </File> 
     444                        <File 
     445                                RelativePath=".\RayCaster.h" 
     446                                > 
     447                        </File> 
     448                        <File 
     449                                RelativePath=".\RayInfo.h" 
     450                                > 
     451                        </File> 
     452                        <File 
     453                                RelativePath=".\havran\raypack.h" 
     454                                > 
     455                        </File> 
     456                        <File 
     457                                RelativePath=".\Timer\RDTSCTimer.h" 
     458                                > 
     459                        </File> 
     460                        <File 
     461                                RelativePath=".\Rectangle3.h" 
     462                                > 
     463                        </File> 
     464                        <File 
     465                                RelativePath=".\Renderer.h" 
     466                                > 
     467                        </File> 
     468                        <File 
     469                                RelativePath=".\RenderSimulator.h" 
     470                                > 
     471                        </File> 
     472                        <File 
     473                                RelativePath=".\RenderTexture.h" 
     474                                > 
     475                        </File> 
     476                        <File 
     477                                RelativePath=".\ResourceManager.h" 
     478                                > 
     479                        </File> 
     480                        <File 
     481                                RelativePath=".\ReverseGvs.h" 
     482                                > 
     483                        </File> 
     484                        <File 
     485                                RelativePath=".\RndGauss.h" 
     486                                > 
     487                        </File> 
     488                        <File 
     489                                RelativePath=".\RssTree.h" 
     490                                > 
     491                        </File> 
     492                        <File 
     493                                RelativePath=".\SamplingStrategy.h" 
     494                                > 
     495                        </File> 
     496                        <File 
     497                                RelativePath=".\SceneGraph.h" 
     498                                > 
     499                        </File> 
     500                        <File 
     501                                RelativePath=".\SimpleRay.h" 
     502                                > 
     503                        </File> 
     504                        <File 
     505                                RelativePath=".\Statistics.h" 
     506                                > 
     507                        </File> 
     508                        <File 
     509                                RelativePath=".\SubdivisionCandidate.h" 
     510                                > 
     511                        </File> 
     512                        <File 
     513                                RelativePath=".\Tetrahedron3.h" 
     514                                > 
     515                        </File> 
     516                        <File 
     517                                RelativePath=".\havran\timer.h" 
     518                                > 
     519                        </File> 
     520                        <File 
     521                                RelativePath=".\Trackball.h" 
     522                                > 
     523                        </File> 
     524                        <File 
     525                                RelativePath=".\TraversalTree.h" 
     526                                > 
     527                        </File> 
     528                        <File 
     529                                RelativePath=".\Triangle3.h" 
     530                                > 
     531                        </File> 
     532                        <File 
     533                                RelativePath=".\UnigraphicsParser.h" 
     534                                > 
     535                        </File> 
     536                        <File 
     537                                RelativePath=".\Vector2.h" 
     538                                > 
     539                        </File> 
     540                        <File 
     541                                RelativePath=".\Vector3.h" 
     542                                > 
     543                        </File> 
     544                        <File 
     545                                RelativePath=".\ViewCell.h" 
     546                                > 
     547                        </File> 
     548                        <File 
     549                                RelativePath=".\ViewCellBsp.h" 
     550                                > 
     551                        </File> 
     552                        <File 
     553                                RelativePath=".\ViewCellsManager.h" 
     554                                > 
     555                        </File> 
     556                        <File 
     557                                RelativePath=".\VrmlExporter.h" 
     558                                > 
     559                        </File> 
     560                        <File 
     561                                RelativePath=".\VspBspTree.h" 
     562                                > 
     563                        </File> 
     564                        <File 
     565                                RelativePath=".\VspTree.h" 
     566                                > 
     567                        </File> 
     568                        <File 
     569                                RelativePath=".\VssRay.h" 
     570                                > 
     571                        </File> 
     572                        <File 
     573                                RelativePath=".\VssTree.h" 
     574                                > 
     575                        </File> 
     576                        <File 
     577                                RelativePath=".\X3dParserXerces.h" 
     578                                > 
     579                        </File> 
     580                </Filter> 
     581                <Filter 
     582                        Name="havran" 
     583                        > 
     584                        <File 
     585                                RelativePath=".\havran\allocgo2.cpp" 
     586                                > 
     587                        </File> 
     588                        <File 
     589                                RelativePath=".\havran\allocgo2.h" 
     590                                > 
     591                        </File> 
     592                        <File 
     593                                RelativePath=".\HavranDynRayCaster.cpp" 
     594                                > 
     595                        </File> 
     596                        <File 
     597                                RelativePath=".\HavranRayCaster.cpp" 
     598                                > 
     599                        </File> 
     600                        <File 
     601                                RelativePath=".\havran\ktb.cpp" 
     602                                > 
     603                        </File> 
     604                        <File 
     605                                RelativePath=".\havran\ktb.h" 
     606                                > 
     607                        </File> 
     608                        <File 
     609                                RelativePath=".\havran\ktb8b.cpp" 
     610                                > 
     611                        </File> 
     612                        <File 
     613                                RelativePath=".\havran\ktb8b.h" 
     614                                > 
     615                        </File> 
     616                        <File 
     617                                RelativePath=".\havran\ktbai.cpp" 
     618                                > 
     619                        </File> 
     620                        <File 
     621                                RelativePath=".\havran\ktbai.h" 
     622                                > 
     623                        </File> 
     624                        <File 
     625                                RelativePath=".\havran\ktball.cpp" 
     626                                > 
     627                        </File> 
     628                        <File 
     629                                RelativePath=".\havran\ktball.h" 
     630                                > 
     631                        </File> 
     632                        <File 
     633                                RelativePath=".\havran\ktbconf.h" 
     634                                > 
     635                        </File> 
     636                        <File 
     637                                RelativePath=".\havran\ktbf2trv.cpp" 
     638                                > 
     639                        </File> 
     640                        <File 
     641                                RelativePath=".\havran\ktbftrav.cpp" 
     642                                > 
     643                        </File> 
     644                        <File 
     645                                RelativePath=".\havran\ktbs.cpp" 
     646                                > 
     647                        </File> 
     648                        <File 
     649                                RelativePath=".\havran\ktbs.h" 
     650                                > 
     651                        </File> 
     652                        <File 
     653                                RelativePath=".\havran\ktbtrav.cpp" 
     654                                > 
     655                        </File> 
     656                        <File 
     657                                RelativePath=".\havran\ktbtrav.h" 
     658                                > 
     659                        </File> 
     660                        <File 
     661                                RelativePath=".\havran\sbbox.cpp" 
     662                                > 
     663                        </File> 
     664                        <File 
     665                                RelativePath=".\havran\sbbox.h" 
     666                                > 
     667                        </File> 
     668                        <File 
     669                                RelativePath=".\havran\subdivm.h" 
     670                                > 
     671                        </File> 
     672                        <File 
     673                                RelativePath=".\havran\testrt.cpp" 
     674                                > 
     675                        </File> 
     676                        <File 
     677                                RelativePath=".\havran\testrt.h" 
     678                                > 
     679                        </File> 
     680                </Filter> 
     681                <Filter 
     682                        Name="Renderer" 
     683                        > 
     684                        <File 
     685                                RelativePath=".\glInterface.h" 
     686                                > 
     687                        </File> 
     688                        <File 
     689                                RelativePath=".\GlobalLinesRenderer.cpp" 
     690                                > 
     691                        </File> 
     692                        <File 
     693                                RelativePath=".\GlobalLinesRenderer.h" 
     694                                > 
     695                        </File> 
     696                        <File 
     697                                RelativePath=".\GlRenderer.cpp" 
     698                                > 
     699                        </File> 
     700                        <File 
     701                                RelativePath=".\GlRenderer.h" 
     702                                > 
     703                        </File> 
     704                </Filter> 
     705                <Filter 
     706                        Name="Loader" 
     707                        > 
     708                        <File 
     709                                RelativePath=".\ObjectsParser.cpp" 
     710                                > 
     711                        </File> 
     712                        <File 
     713                                RelativePath=".\ObjectsParser.h" 
     714                                > 
     715                        </File> 
     716                        <File 
     717                                RelativePath=".\ObjectsParserXerces.h" 
     718                                > 
     719                        </File> 
     720                        <File 
     721                                RelativePath=".\ObjParser.cpp" 
     722                                > 
     723                        </File> 
     724                        <File 
     725                                RelativePath=".\ObjParser.h" 
     726                                > 
     727                        </File> 
     728                        <File 
     729                                RelativePath=".\plyfile.c" 
     730                                > 
     731                        </File> 
     732                        <File 
     733                                RelativePath=".\PlyParser.cpp" 
     734                                > 
     735                        </File> 
     736                        <File 
     737                                RelativePath=".\PreprocessorFactory.h" 
     738                                > 
     739                        </File> 
     740                        <File 
     741                                RelativePath=".\UnigraphicsParser.cpp" 
     742                                > 
     743                        </File> 
     744                        <File 
     745                                RelativePath=".\ViewCellsParser.h" 
     746                                > 
     747                        </File> 
     748                        <File 
     749                                RelativePath=".\ViewCellsParserXerces.h" 
     750                                > 
     751                        </File> 
     752                        <File 
     753                                RelativePath=".\VrmlExporter.cpp" 
     754                                > 
     755                        </File> 
     756                        <File 
     757                                RelativePath=".\X3dParser.cpp" 
     758                                > 
     759                        </File> 
     760                        <File 
     761                                RelativePath=".\X3dParser.h" 
     762                                > 
     763                        </File> 
     764                </Filter> 
     765                <Filter 
     766                        Name="Preprocessors" 
     767                        > 
     768                        <File 
     769                                RelativePath=".\CombinedPreprocessor.cpp" 
     770                                > 
     771                        </File> 
     772                        <File 
     773                                RelativePath=".\CombinedPreprocessor.h" 
     774                                > 
     775                        </File> 
     776                        <File 
     777                                RelativePath=".\GvsPreprocessor.cpp" 
     778                                > 
     779                        </File> 
     780                        <File 
     781                                RelativePath=".\GvsPreprocessor.h" 
     782                                > 
     783                        </File> 
     784                        <File 
     785                                RelativePath=".\Preprocessor.cpp" 
     786                                > 
     787                        </File> 
     788                        <File 
     789                                RelativePath=".\Preprocessor.h" 
     790                                > 
     791                        </File> 
     792                        <File 
     793                                RelativePath=".\PreprocessorFactory.cpp" 
     794                                > 
     795                        </File> 
     796                        <File 
     797                                RelativePath=".\RenderSampler.cpp" 
     798                                > 
     799                        </File> 
     800                        <File 
     801                                RelativePath=".\RenderSampler.h" 
     802                                > 
     803                        </File> 
     804                        <File 
     805                                RelativePath=".\RssPreprocessor.cpp" 
     806                                > 
     807                        </File> 
     808                        <File 
     809                                RelativePath=".\RssPreprocessor.h" 
     810                                > 
     811                        </File> 
     812                        <File 
     813                                RelativePath=".\SamplingPreprocessor.cpp" 
     814                                > 
     815                        </File> 
     816                        <File 
     817                                RelativePath=".\SamplingPreprocessor.h" 
     818                                > 
     819                        </File> 
     820                        <File 
     821                                RelativePath=".\VssPreprocessor.cpp" 
     822                                > 
     823                        </File> 
     824                        <File 
     825                                RelativePath=".\VssPreprocessor.h" 
     826                                > 
     827                        </File> 
     828                </Filter> 
     829                <Filter 
    204830                        Name="Source Files" 
    205831                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" 
     
    231857                        </File> 
    232858                        <File 
    233                                 RelativePath=".\CombinedPreprocessor.cpp" 
    234                                 > 
    235                         </File> 
    236                         <File 
    237859                                RelativePath=".\common.cpp" 
    238860                                > 
     
    255877                        </File> 
    256878                        <File 
    257                                 RelativePath=".\GlobalLinesRenderer.cpp" 
    258                                 > 
    259                         </File> 
    260                         <File 
    261                                 RelativePath=".\GlRenderer.cpp" 
    262                                 > 
    263                         </File> 
    264                         <File 
    265                                 RelativePath=".\GvsPreprocessor.cpp" 
    266                                 > 
    267                         </File> 
    268                         <File 
    269879                                RelativePath=".\GzBinFileInputStream.cpp" 
    270880                                > 
     
    283893                        </File> 
    284894                        <File 
    285                                 RelativePath=".\HavranDynRayCaster.cpp" 
    286                                 > 
    287                         </File> 
    288                         <File 
    289                                 RelativePath=".\HavranRayCaster.cpp" 
    290                                 > 
    291                         </File> 
    292                         <File 
    293895                                RelativePath=".\HierarchyManager.cpp" 
    294896                                > 
     
    359961                        </File> 
    360962                        <File 
    361                                 RelativePath=".\ObjectsParser.cpp" 
    362                                 > 
    363                         </File> 
    364                         <File 
    365963                                RelativePath=".\ObjExporter.cpp" 
    366964                                > 
    367965                        </File> 
    368966                        <File 
    369                                 RelativePath=".\ObjParser.cpp" 
    370                                 > 
    371                         </File> 
    372                         <File 
    373967                                RelativePath=".\OcclusionQuery.cpp" 
    374968                                > 
     
    383977                        </File> 
    384978                        <File 
    385                                 RelativePath=".\plyfile.c" 
    386                                 > 
    387                         </File> 
    388                         <File 
    389                                 RelativePath=".\PlyParser.cpp" 
    390                                 > 
    391                         </File> 
    392                         <File 
    393979                                RelativePath=".\Polygon3.cpp" 
    394980                                > 
     
    399985                        </File> 
    400986                        <File 
    401                                 RelativePath=".\Preprocessor.cpp" 
    402                                 > 
    403                         </File> 
    404                         <File 
    405                                 RelativePath=".\PreprocessorFactory.cpp" 
    406                                 > 
    407                         </File> 
    408                         <File 
    409987                                RelativePath=".\PreprocessorThread.cpp" 
    410988                                > 
     
    4391017                        </File> 
    4401018                        <File 
    441                                 RelativePath=".\RenderSampler.cpp" 
    442                                 > 
    443                         </File> 
    444                         <File 
    4451019                                RelativePath=".\RenderSimulator.cpp" 
    4461020                                > 
     
    4551029                        </File> 
    4561030                        <File 
    457                                 RelativePath=".\RssPreprocessor.cpp" 
    458                                 > 
    459                         </File> 
    460                         <File 
    4611031                                RelativePath=".\RssTree.cpp" 
    4621032                                > 
    4631033                        </File> 
    4641034                        <File 
    465                                 RelativePath=".\SamplingPreprocessor.cpp" 
    466                                 > 
    467                         </File> 
    468                         <File 
    4691035                                RelativePath=".\SamplingStrategy.cpp" 
    4701036                                > 
     
    4991065                        </File> 
    5001066                        <File 
    501                                 RelativePath=".\UnigraphicsParser.cpp" 
    502                                 > 
    503                         </File> 
    504                         <File 
    5051067                                RelativePath=".\Vector2.cpp" 
    5061068                                > 
     
    5271089                        </File> 
    5281090                        <File 
    529                                 RelativePath=".\VrmlExporter.cpp" 
    530                                 > 
    531                         </File> 
    532                         <File 
    5331091                                RelativePath=".\VspBspTree.cpp" 
    5341092                                > 
     
    5391097                        </File> 
    5401098                        <File 
    541                                 RelativePath=".\VssPreprocessor.cpp" 
    542                                 > 
    543                         </File> 
    544                         <File 
    5451099                                RelativePath=".\VssRay.cpp" 
    5461100                                > 
     
    5551109                        </File> 
    5561110                        <File 
    557                                 RelativePath=".\X3dParser.cpp" 
    558                                 > 
    559                         </File> 
    560                 </Filter> 
    561                 <Filter 
    562                         Name="Header Files" 
    563                         Filter="h;hpp;hxx;hm;inl;inc;xsd" 
    564                         UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" 
    565                         > 
    566                         <File 
    567                                 RelativePath=".\AxisAlignedBox3.h" 
    568                                 > 
    569                         </File> 
    570                         <File 
    571                                 RelativePath=".\Beam.h" 
    572                                 > 
    573                         </File> 
    574                         <File 
    575                                 RelativePath=".\Timer\BenchTimer.h" 
    576                                 > 
    577                         </File> 
    578                         <File 
    579                                 RelativePath=".\BitVectorPvs.h" 
    580                                 > 
    581                         </File> 
    582                         <File 
    583                                 RelativePath=".\BoostPreprocessorThread.h" 
    584                                 > 
    585                         </File> 
    586                         <File 
    587                                 RelativePath=".\BoundingBoxConverter.h" 
    588                                 > 
    589                         </File> 
    590                         <File 
    591                                 RelativePath=".\BvHierarchy.h" 
    592                                 > 
    593                         </File> 
    594                         <File 
    595                                 RelativePath=".\Camera.h" 
    596                                 > 
    597                         </File> 
    598                         <File 
    599                                 RelativePath=".\CombinedPreprocessor.h" 
    600                                 > 
    601                         </File> 
    602                         <File 
    603                                 RelativePath=".\common.h" 
    604                                 > 
    605                         </File> 
    606                         <File 
    607                                 RelativePath=".\havran\configh.h" 
    608                                 > 
    609                         </File> 
    610                         <File 
    611                                 RelativePath=".\Containers.h" 
    612                                 > 
    613                         </File> 
    614                         <File 
    615                                 RelativePath=".\DifferenceSampling.h" 
    616                                 > 
    617                         </File> 
    618                         <File 
    619                                 RelativePath=".\Environment.h" 
    620                                 > 
    621                         </File> 
    622                         <File 
    623                                 RelativePath=".\ExactPreprocessor.h" 
    624                                 > 
    625                         </File> 
    626                         <File 
    627                                 RelativePath=".\Exporter.h" 
    628                                 > 
    629                         </File> 
    630                         <File 
    631                                 RelativePath=".\FilterBasedDistribution.cpp" 
    632                                 > 
    633                         </File> 
    634                         <File 
    635                                 RelativePath=".\FilterBasedDistribution.h" 
    636                                 > 
    637                         </File> 
    638                         <File 
    639                                 RelativePath=".\FlexibleHeap.h" 
    640                                 > 
    641                         </File> 
    642                         <File 
    643                                 RelativePath=".\glInterface.h" 
    644                                 > 
    645                         </File> 
    646                         <File 
    647                                 RelativePath=".\GlobalLinesRenderer.h" 
    648                                 > 
    649                         </File> 
    650                         <File 
    651                                 RelativePath=".\GlRenderer.h" 
    652                                 > 
    653                         </File> 
    654                         <File 
    655                                 RelativePath=".\GvsPreprocessor.h" 
    656                                 > 
    657                         </File> 
    658                         <File 
    659                                 RelativePath=".\GzBinFileInputStream.h" 
    660                                 > 
    661                         </File> 
    662                         <File 
    663                                 RelativePath=".\GzFileInputSource.h" 
    664                                 > 
    665                         </File> 
    666                         <File 
    667                                 RelativePath=".\gzstream.h" 
    668                                 > 
    669                         </File> 
    670                         <File 
    671                                 RelativePath=".\Halton.h" 
    672                                 > 
    673                         </File> 
    674                         <File 
    675                                 RelativePath=".\HashPvs.h" 
    676                                 > 
    677                         </File> 
    678                         <File 
    679                                 RelativePath=".\HavranRayCaster.h" 
    680                                 > 
    681                         </File> 
    682                         <File 
    683                                 RelativePath=".\HierarchyManager.h" 
    684                                 > 
    685                         </File> 
    686                         <File 
    687                                 RelativePath=".\IntelRayCaster.h" 
    688                                 > 
    689                         </File> 
    690                         <File 
    691                                 RelativePath=".\InternalRayCaster.h" 
    692                                 > 
    693                         </File> 
    694                         <File 
    695                                 RelativePath=".\Intersectable.h" 
    696                                 > 
    697                         </File> 
    698                         <File 
    699                                 RelativePath=".\IntersectableWrapper.h" 
    700                                 > 
    701                         </File> 
    702                         <File 
    703                                 RelativePath=".\IntersectionBoundingBoxConverter.h" 
    704                                 > 
    705                         </File> 
    706                         <File 
    707                                 RelativePath=".\KdTree.h" 
    708                                 > 
    709                         </File> 
    710                         <File 
    711                                 RelativePath=".\LogManager.h" 
    712                                 > 
    713                         </File> 
    714                         <File 
    715                                 RelativePath=".\Mailable.h" 
    716                                 > 
    717                         </File> 
    718                         <File 
    719                                 RelativePath=".\Material.h" 
    720                                 > 
    721                         </File> 
    722                         <File 
    723                                 RelativePath=".\Matrix4x4.h" 
    724                                 > 
    725                         </File> 
    726                         <File 
    727                                 RelativePath=".\Timer\merror.h" 
    728                                 > 
    729                         </File> 
    730                         <File 
    731                                 RelativePath=".\Mesh.h" 
    732                                 > 
    733                         </File> 
    734                         <File 
    735                                 RelativePath=".\MeshKdTree.h" 
    736                                 > 
    737                         </File> 
    738                         <File 
    739                                 RelativePath=".\Timer\mstring.h" 
    740                                 > 
    741                         </File> 
    742                         <File 
    743                                 RelativePath=".\Mutation.h" 
    744                                 > 
    745                         </File> 
    746                         <File 
    747                                 RelativePath=".\MutualVisibility.h" 
    748                                 > 
    749                         </File> 
    750                         <File 
    751                                 RelativePath=".\ObjectPvs.h" 
    752                                 > 
    753                         </File> 
    754                         <File 
    755                                 RelativePath=".\ObjectsParser.h" 
    756                                 > 
    757                         </File> 
    758                         <File 
    759                                 RelativePath=".\ObjectsParserXerces.h" 
    760                                 > 
    761                         </File> 
    762                         <File 
    763                                 RelativePath=".\ObjExporter.h" 
    764                                 > 
    765                         </File> 
    766                         <File 
    767                                 RelativePath=".\ObjParser.h" 
    768                                 > 
    769                         </File> 
    770                         <File 
    771                                 RelativePath=".\OcclusionQuery.h" 
    772                                 > 
    773                         </File> 
    774                         <File 
    775                                 RelativePath=".\OspTree.h" 
    776                                 > 
    777                         </File> 
    778                         <File 
    779                                 RelativePath=".\Parser.h" 
    780                                 > 
    781                         </File> 
    782                         <File 
    783                                 RelativePath=".\Timer\PerfTimer.h" 
    784                                 > 
    785                         </File> 
    786                         <File 
    787                                 RelativePath=".\Timer\PerfTimerSkeleton.h" 
    788                                 > 
    789                         </File> 
    790                         <File 
    791                                 RelativePath=".\Plane3.h" 
    792                                 > 
    793                         </File> 
    794                         <File 
    795                                 RelativePath=".\ply.h" 
    796                                 > 
    797                         </File> 
    798                         <File 
    799                                 RelativePath=".\PlyParser.h" 
    800                                 > 
    801                         </File> 
    802                         <File 
    803                                 RelativePath=".\Polygon3.h" 
    804                                 > 
    805                         </File> 
    806                         <File 
    807                                 RelativePath=".\Polytope.h" 
    808                                 > 
    809                         </File> 
    810                         <File 
    811                                 RelativePath=".\Preprocessor.h" 
    812                                 > 
    813                         </File> 
    814                         <File 
    815                                 RelativePath=".\PreprocessorFactory.h" 
    816                                 > 
    817                         </File> 
    818                         <File 
    819                                 RelativePath=".\PreprocessorThread.h" 
    820                                 > 
    821                         </File> 
    822                         <File 
    823                                 RelativePath=".\Pvs.h" 
    824                                 > 
    825                         </File> 
    826                         <File 
    827                                 RelativePath=".\PvsBase.h" 
    828                                 > 
    829                         </File> 
    830                         <File 
    831                                 RelativePath=".\PvsDefinitions.h" 
    832                                 > 
    833                         </File> 
    834                         <File 
    835                                 RelativePath=".\RandomViewCellsHandler.h" 
    836                                 > 
    837                         </File> 
    838                         <File 
    839                                 RelativePath=".\Ray.h" 
    840                                 > 
    841                         </File> 
    842                         <File 
    843                                 RelativePath=".\RayCaster.h" 
    844                                 > 
    845                         </File> 
    846                         <File 
    847                                 RelativePath=".\RayInfo.h" 
    848                                 > 
    849                         </File> 
    850                         <File 
    851                                 RelativePath=".\havran\raypack.h" 
    852                                 > 
    853                         </File> 
    854                         <File 
    855                                 RelativePath=".\Timer\RDTSCTimer.h" 
    856                                 > 
    857                         </File> 
    858                         <File 
    859                                 RelativePath=".\Rectangle3.h" 
    860                                 > 
    861                         </File> 
    862                         <File 
    863                                 RelativePath=".\Renderer.h" 
    864                                 > 
    865                         </File> 
    866                         <File 
    867                                 RelativePath=".\RenderSampler.h" 
    868                                 > 
    869                         </File> 
    870                         <File 
    871                                 RelativePath=".\RenderSimulator.h" 
    872                                 > 
    873                         </File> 
    874                         <File 
    875                                 RelativePath=".\RenderTexture.h" 
    876                                 > 
    877                         </File> 
    878                         <File 
    879                                 RelativePath=".\ResourceManager.h" 
    880                                 > 
    881                         </File> 
    882                         <File 
    883                                 RelativePath=".\ReverseGvs.h" 
    884                                 > 
    885                         </File> 
    886                         <File 
    887                                 RelativePath=".\RndGauss.h" 
    888                                 > 
    889                         </File> 
    890                         <File 
    891                                 RelativePath=".\RssPreprocessor.h" 
    892                                 > 
    893                         </File> 
    894                         <File 
    895                                 RelativePath=".\RssTree.h" 
    896                                 > 
    897                         </File> 
    898                         <File 
    899                                 RelativePath=".\SamplingPreprocessor.h" 
    900                                 > 
    901                         </File> 
    902                         <File 
    903                                 RelativePath=".\SamplingStrategy.h" 
    904                                 > 
    905                         </File> 
    906                         <File 
    907                                 RelativePath=".\SceneGraph.h" 
    908                                 > 
    909                         </File> 
    910                         <File 
    911                                 RelativePath=".\SimpleRay.h" 
    912                                 > 
    913                         </File> 
    914                         <File 
    915                                 RelativePath=".\Statistics.h" 
    916                                 > 
    917                         </File> 
    918                         <File 
    919                                 RelativePath=".\SubdivisionCandidate.h" 
    920                                 > 
    921                         </File> 
    922                         <File 
    923                                 RelativePath=".\Tetrahedron3.h" 
    924                                 > 
    925                         </File> 
    926                         <File 
    927                                 RelativePath=".\havran\timer.h" 
    928                                 > 
    929                         </File> 
    930                         <File 
    931                                 RelativePath=".\Trackball.h" 
    932                                 > 
    933                         </File> 
    934                         <File 
    935                                 RelativePath=".\TraversalTree.h" 
    936                                 > 
    937                         </File> 
    938                         <File 
    939                                 RelativePath=".\Triangle3.h" 
    940                                 > 
    941                         </File> 
    942                         <File 
    943                                 RelativePath=".\UnigraphicsParser.h" 
    944                                 > 
    945                         </File> 
    946                         <File 
    947                                 RelativePath=".\Vector2.h" 
    948                                 > 
    949                         </File> 
    950                         <File 
    951                                 RelativePath=".\Vector3.h" 
    952                                 > 
    953                         </File> 
    954                         <File 
    955                                 RelativePath=".\ViewCell.h" 
    956                                 > 
    957                         </File> 
    958                         <File 
    959                                 RelativePath=".\ViewCellBsp.h" 
    960                                 > 
    961                         </File> 
    962                         <File 
    963                                 RelativePath=".\ViewCellsManager.h" 
    964                                 > 
    965                         </File> 
    966                         <File 
    967                                 RelativePath=".\ViewCellsParser.h" 
    968                                 > 
    969                         </File> 
    970                         <File 
    971                                 RelativePath=".\ViewCellsParserXerces.h" 
    972                                 > 
    973                         </File> 
    974                         <File 
    975                                 RelativePath=".\VrmlExporter.h" 
    976                                 > 
    977                         </File> 
    978                         <File 
    979                                 RelativePath=".\VspBspTree.h" 
    980                                 > 
    981                         </File> 
    982                         <File 
    983                                 RelativePath=".\VspTree.h" 
    984                                 > 
    985                         </File> 
    986                         <File 
    987                                 RelativePath=".\VssPreprocessor.h" 
    988                                 > 
    989                         </File> 
    990                         <File 
    991                                 RelativePath=".\VssRay.h" 
    992                                 > 
    993                         </File> 
    994                         <File 
    995                                 RelativePath=".\VssTree.h" 
    996                                 > 
    997                         </File> 
    998                         <File 
    9991111                                RelativePath=".\X3dExporter.h" 
    1000                                 > 
    1001                         </File> 
    1002                         <File 
    1003                                 RelativePath=".\X3dParser.h" 
    1004                                 > 
    1005                         </File> 
    1006                         <File 
    1007                                 RelativePath=".\X3dParserXerces.h" 
    1008                                 > 
    1009                         </File> 
    1010                 </Filter> 
    1011                 <Filter 
    1012                         Name="havran" 
    1013                         > 
    1014                         <File 
    1015                                 RelativePath=".\havran\allocgo2.cpp" 
    1016                                 > 
    1017                         </File> 
    1018                         <File 
    1019                                 RelativePath=".\havran\allocgo2.h" 
    1020                                 > 
    1021                         </File> 
    1022                         <File 
    1023                                 RelativePath=".\havran\ktb.cpp" 
    1024                                 > 
    1025                         </File> 
    1026                         <File 
    1027                                 RelativePath=".\havran\ktb.h" 
    1028                                 > 
    1029                         </File> 
    1030                         <File 
    1031                                 RelativePath=".\havran\ktb8b.cpp" 
    1032                                 > 
    1033                         </File> 
    1034                         <File 
    1035                                 RelativePath=".\havran\ktb8b.h" 
    1036                                 > 
    1037                         </File> 
    1038                         <File 
    1039                                 RelativePath=".\havran\ktbai.cpp" 
    1040                                 > 
    1041                         </File> 
    1042                         <File 
    1043                                 RelativePath=".\havran\ktbai.h" 
    1044                                 > 
    1045                         </File> 
    1046                         <File 
    1047                                 RelativePath=".\havran\ktball.cpp" 
    1048                                 > 
    1049                         </File> 
    1050                         <File 
    1051                                 RelativePath=".\havran\ktball.h" 
    1052                                 > 
    1053                         </File> 
    1054                         <File 
    1055                                 RelativePath=".\havran\ktbconf.h" 
    1056                                 > 
    1057                         </File> 
    1058                         <File 
    1059                                 RelativePath=".\havran\ktbf2trv.cpp" 
    1060                                 > 
    1061                         </File> 
    1062                         <File 
    1063                                 RelativePath=".\havran\ktbftrav.cpp" 
    1064                                 > 
    1065                         </File> 
    1066                         <File 
    1067                                 RelativePath=".\havran\ktbs.cpp" 
    1068                                 > 
    1069                         </File> 
    1070                         <File 
    1071                                 RelativePath=".\havran\ktbs.h" 
    1072                                 > 
    1073                         </File> 
    1074                         <File 
    1075                                 RelativePath=".\havran\ktbtrav.cpp" 
    1076                                 > 
    1077                         </File> 
    1078                         <File 
    1079                                 RelativePath=".\havran\ktbtrav.h" 
    1080                                 > 
    1081                         </File> 
    1082                         <File 
    1083                                 RelativePath=".\havran\sbbox.cpp" 
    1084                                 > 
    1085                         </File> 
    1086                         <File 
    1087                                 RelativePath=".\havran\sbbox.h" 
    1088                                 > 
    1089                         </File> 
    1090                         <File 
    1091                                 RelativePath=".\havran\subdivm.h" 
    1092                                 > 
    1093                         </File> 
    1094                         <File 
    1095                                 RelativePath=".\havran\testrt.cpp" 
    1096                                 > 
    1097                         </File> 
    1098                         <File 
    1099                                 RelativePath=".\havran\testrt.h" 
    11001112                                > 
    11011113                        </File> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp

    r2694 r2695  
    8787        mGvsStats.Reset(); 
    8888 
    89         // hack: some generic statistical values that can be read 
     89        // hack: some generic statistical values that can be used 
    9090        // by an application using the preprocessor 
    9191        for (int i = 0; i < 2; ++ i) 
     
    110110                mRayQueue.pop(); 
    111111 
    112                 //delete ray; 
     112                // note: deletion of the ray is handled by ray pool 
    113113        } 
    114114} 
     
    145145        const float len = Magnitude(currentRay.mTermination - currentRay.mOrigin); 
    146146         
     147#if 1 
    147148        // distance large => this is likely to be a discontinuity 
    148 #if 1 
    149149        if ((predictedLen - len) > mThreshold) 
    150 #else // rather use relative distance 
     150#else  
     151        // q: rather use relative distance? 
    151152        if ((predictedLen / len) > mThreshold) 
    152153#endif 
     
    155156                VssRay *newRay = ReverseSampling(currentRay, hitTriangle, oldRay); 
    156157 
    157                 if (!newRay) 
     158                // check if reverse sampling was successful 
     159                if (newRay) 
     160                { 
     161                        // set flag for visualization 
     162                        if (0) newRay->mFlags |= VssRay::ReverseSample; 
     163                 
     164                        // check if ray can be processed further 
     165                        // note: ray deletion handled by ray pool) 
     166                        HandleRay(newRay); 
     167 
    158168                        return 1; 
    159  
    160                 // set flag for visualization 
    161                 if (0) newRay->mFlags |= VssRay::ReverseSample; 
    162                  
    163                 // check if ray is not further processed (ray not deleted because using ray pool) 
    164                 HandleRay(newRay); 
    165                  
    166                 return 1; 
     169                } 
    167170        } 
    168171 
     
    510513        const Vector3 pt3 = oldRay.mOrigin + t * (oldRay.mTermination - oldRay.mOrigin); 
    511514 
    512         // Evaluate new hitpoint just outside the triangle 
    513         const float eps = mEps; 
    514  
     515        // evaluate new hitpoint just outside the triangle 
    515516        // the point is chosen to be on the side closer to the original ray 
    516517        if (Distance(pt1, pt3) < Distance(pt2, pt3)) 
    517                 newPoint = pt1 + eps * (pt1 - pt2); 
     518                newPoint = pt1 + mEps * (pt1 - pt2); 
    518519        else 
    519                 newPoint = pt2 + eps * (pt2 - pt1); 
     520                newPoint = pt2 + mEps * (pt2 - pt1); 
    520521 
    521522        //cout << "passing point: " << newPoint << endl << endl; 
     
    548549    Vector3 newPoint; 
    549550 
    550         // why is there sometimes no intersecton found? 
     551        // q: why is there sometimes no intersecton found? 
    551552        if (!GetPassingPoint(currentRay, occluder, oldRay, newPoint)) 
    552553                return NULL; 
     
    589590        } 
    590591 
     592        ++ mGvsStats.mReverseSamples; 
     593 
    591594        const SimpleRay simpleRay(newOrigin, newDir, SamplingStrategy::GVS, 1.0f); 
    592595 
    593596        VssRay *reverseRay =  
    594597                mRayCaster->CastRay(simpleRay, mViewCellsManager->GetViewSpaceBox(), !mPerViewCell); 
    595  
    596     ++ mGvsStats.mReverseSamples; 
    597598 
    598599        return reverseRay; 
     
    646647int GvsPreprocessor::ProcessQueue() 
    647648{ 
    648         ++ mGvsStats.mGvsPass; 
     649        ++ mGvsStats.mGvsRuns; 
    649650 
    650651        int castSamples = 0; 
     
    10061007void GvsPreprocessor::GetObjectPvs(ObjectContainer &objectPvs) const 
    10071008{ 
     1009        BvhLeaf::NewMail(); 
     1010 
    10081011        objectPvs.reserve((int)mTrianglePvs.size()); 
    1009  
    1010         BvhLeaf::NewMail(); 
    10111012 
    10121013        ObjectContainer::const_iterator oit, oit_end = mTrianglePvs.end(); 
     
    12001201                app << "#Pass\n" << mPass << endl; 
    12011202                app << "#ScDiff\n" << mPassContribution << endl; 
    1202                 app << "#GvsRuns\n" << mGvsPass << endl;         
     1203                app << "#GvsRuns\n" << mGvsRuns << endl;         
    12031204 
    12041205                app     << "#SamplesContri\n" << mTotalContribution << endl; 
     
    12111212void GvsPreprocessor::ComputeViewCell() 
    12121213{ 
     1214        if (mCurrentViewCell->GetId() != 499) return; 
     1215 
     1216        // clean up 
     1217        mTrianglePvs.clear(); 
     1218 
    12131219        mCurrentViewCell->GetMesh()->ComputeBoundingBox(); 
    12141220 
     
    12241230        mGvsStats.mPerViewCellSamples = 0; 
    12251231 
    1226         int oldContribution = mGvsStats.mTotalContribution; 
     1232        int oldContribution = 0; 
    12271233        int passSamples = 0; 
    1228  
     1234         
    12291235        for (int i = 0; i < 0; ++ i) 
    12301236                mGenericStats[i] = 0; 
     
    12331239        { 
    12341240                int oldPvsSize = mCurrentViewCell->GetPvs().GetSize(); 
    1235  
     1241                 
    12361242                mRayCaster->InitPass(); 
    12371243 
     
    12821288                                break; 
    12831289 
    1284                         // reset 
     1290                        // reset stats 
    12851291                        oldContribution = mGvsStats.mTotalContribution; 
    12861292                        mGvsStats.mPassContribution = 0; 
     
    13001306 
    13011307        ComputeStats(); 
    1302  
    1303         // clean up 
    1304         mTrianglePvs.clear(); 
    13051308} 
    13061309 
     
    14211424 
    14221425                mTrianglePvs.push_back(triObj); 
     1426                //mDummyBuffer.push_back(mGvsStats.mGvsRuns); 
    14231427                mGenericStats[0] = (int)mTrianglePvs.size(); 
    14241428                return true; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.h

    r2694 r2695  
    3737                mReverseSamples = 0; 
    3838                mBorderSamples = 0; 
    39                 mGvsPass = 0; 
     39                mGvsRuns = 0; 
    4040 
    4141                mTotalPvs = 0; 
     
    6060        int mReverseSamples; 
    6161        int mBorderSamples; 
    62         int mGvsPass; 
     62        int mGvsRuns; 
    6363 
    6464        int mTotalPvs; 
     
    287287        int mMaxViewCells; 
    288288 
    289         ObjectContainer mTrianglePvs; 
    290  
    291         // HACK 
    292289        int mGvsSamplesPerPass; 
    293290 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h

    r2575 r2695  
    278278         
    279279        void EvaluateSubdivision(std::ofstream &splitsStats, 
    280                                                           const int splitsStepSize, 
    281                                                           const bool useFilter, 
    282                                                           const bool useHisto, 
    283                                                           const int histoMem, 
    284                                                           const int pass); 
     280                                                         int splitsStepSize, 
     281                                                         bool useFilter, 
     282                                                         bool useHisto, 
     283                                                         int histoMem, 
     284                                                         int pass); 
    285285 
    286286 
     
    290290        void CreateUniqueObjectIds(); 
    291291 
    292         float EvalCorrectedPvs(const float pvsFront,  
    293                                                    const float totalPvs, 
    294                                                    const float raysPerObjects) const; 
     292        float EvalCorrectedPvs(float pvsFront,  
     293                                                   float totalPvs, 
     294                                                   float raysPerObjects) const; 
     295 
    295296        /** Casts line segment into the view cells tree. 
    296297                @param origin the origin of the line segment 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r2694 r2695  
    662662                cout << "loading objects from " << buf << endl; 
    663663 
    664                 // load scene objects used as pvs entries 
     664                // load scene objects which are the entities used as pvs entries 
    665665                ObjectContainer pvsObjects; 
    666666                if (0) LoadObjects(buf, pvsObjects, mObjects); 
    667667 
    668                 const bool finalizeViewCells = true; 
     668                const bool finalizeViewCells = false; 
    669669                cout << "loading view cells from " << buf << endl; 
    670670                 
     
    689689                mViewCellsManager = CreateViewCellsManager(buf); 
    690690 
    691                 // default view space is the extent of the scene 
    692                 AxisAlignedBox3 viewSpaceBox; 
    693  
    694691                if (mUseViewSpaceBox) 
    695692                { 
    696                         viewSpaceBox = mSceneGraph->GetBox(); 
     693                        // default view space is the extent of the scene 
     694                        AxisAlignedBox3 viewSpaceBox = mSceneGraph->GetBox(); 
    697695 
    698696                        // use a small box outside of the scene 
    699697                        viewSpaceBox.Scale(Vector3(0.15f, 0.3f, 0.5f)); 
    700                         //viewSpaceBox.Translate(Vector3(Magnitude(mSceneGraph->GetBox().Size()) * 0.5f, 0, 0)); 
    701698                        viewSpaceBox.Translate(Vector3(Magnitude(mSceneGraph->GetBox().Size()) * 0.3f, 0, 0)); 
    702699                        mViewCellsManager->SetViewSpaceBox(viewSpaceBox); 
    703700                } 
    704                 else 
    705                 { 
    706                         viewSpaceBox = mSceneGraph->GetBox(); 
    707                         mViewCellsManager->SetViewSpaceBox(viewSpaceBox); 
    708                 } 
    709  
     701                 
     702                 
    710703                bool loadVcGeometry; 
    711704                Environment::GetSingleton()->GetBoolValue("ViewCells.loadGeometry", loadVcGeometry); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h

    r2694 r2695  
    283283        void UpdateDynamicObjects(); 
    284284 
     285        /// triangle pvs for gvs  
     286        // hack: should be in gvspreprocessor but pulled  
     287        // out here for visualization purpose 
     288        ObjectContainer mTrianglePvs; 
     289 
     290        //std::vector<int> mDummyBuffer; 
     291 
    285292 
    286293protected: 
     
    324331        PreprocessorThread *mThread; 
    325332 
    326   bool mUpdateDynamicObjects; 
     333        bool mUpdateDynamicObjects; 
     334 
     335         
    327336}; 
    328337 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp

    r2694 r2695  
    141141 
    142142 
     143void QtGlRendererBuffer::RenderTrianglePvs() 
     144{ 
     145        ObjectContainer::const_iterator oit, oit_end =  
     146                mViewCellsManager->GetPreprocessor()->mTrianglePvs.end(); 
     147 
     148        //int sz = mViewCellsManager->GetPreprocessor()->mDummyBuffer.size(); 
     149 
     150        int i = 0; 
     151        for (oit = mViewCellsManager->GetPreprocessor()->mTrianglePvs.begin(); 
     152                 oit != oit_end; ++ oit, ++ i) 
     153        { 
     154                //int dum = mViewCellsManager->GetPreprocessor()->mDummyBuffer[i]; 
     155                //glColor3f(0, (float)dum / 20.0f, 1); 
     156                if (mUseFalseColors) SetupFalseColor((*oit)->mId); 
     157 
     158                RenderIntersectable(*oit); 
     159        } 
     160} 
     161 
     162 
     163 
    143164// reimplemented here so that we can snap the error windows 
    144165float QtGlRendererBuffer::GetPixelError(int &pvsSize) 
     
    182203        pvsSize = pvs.GetSize(); 
    183204         
     205        // hack: assume that view cell empty 
    184206        if (pvsSize == 0) 
    185207                return 0.0f; 
    186  
    187         mUseForcedColors = true; 
    188208 
    189209        SetupCamera(); 
     
    270290 
    271291        // some error happened 
    272         if (pixelCount > pixelThres)  
    273         { 
    274                 cout << "f " << mFrame << " id " << viewcell->GetId() << " pvs " << pvsSize << " e " << pixelCount << " vp " << mViewPoint << " vd " << mViewDirection << endl; 
     292        if (1)//pixelCount > pixelThres)  
     293        { 
     294                cout << "f " << mFrame << " id " << viewcell->GetId() << " pvs " << pvsSize  
     295                         << " e " << pixelCount << " vp " << mViewPoint << " vd " << mViewDirection << endl; 
    275296         
    276297                if (mSnapErrorFrames)  
     
    292313                        im.save(qstr, "PNG"); 
    293314 
    294 #if 0 
     315#if 1 
    295316                        /////////// 
    296317                        //-- output computed pvs 
    297  
    298                         //mUseFalseColors = true; 
     318                         
     319                        //mUseFalseColors = false; 
     320                        mUseFalseColors = true; 
    299321                        glPushAttrib(GL_CURRENT_BIT); 
    300322                        glColor3f(0, 1, 0); 
     
    309331 
    310332                        // render pvs once 
    311                         RenderPvs(pvs); 
     333                        //RenderPvs(pvs); 
     334                        RenderTrianglePvs(); 
    312335 
    313336                        glFlush(); 
    314337 
    315                         //mUseForcedColors = false; 
     338                        mUseFalseColors = false; 
     339 
    316340                        im = toImage(); 
    317341                        sprintf(filename, "error-frame-%04d-%04d-%08d-pvs.png", mFrame, viewcell->GetId(), pixelCount); 
     
    338362        int pvsSize = 0; 
    339363        QImage image = toImage(); 
     364 
    340365        Intersectable::NewMail(); 
    341366 
     
    12181243 
    12191244 
     1245QtGlRendererWidget::~QtGlRendererWidget()  
     1246{  
     1247        delete mPlacer;  
     1248} 
     1249 
     1250 
    12201251void 
    12211252QtGlRendererWidget::RenderRenderCost() 
     
    25712602} 
    25722603 
    2573  
    2574 } 
     2604/* 
     2605 
     2606int ExampleRenderThread::faceAtPosition(const QPoint &pos)  
     2607{  
     2608        // we need to lock the rendering context  
     2609        glw.lockGLContext();  
     2610        // this is the same as in every OpenGL picking example  
     2611        const int MaxSize = 512;  
     2612        // see below for an explanation on the buffer content  
     2613        GLuint buffer[MaxSize];  
     2614        GLint viewport[4]; 
     2615        glGetIntegerv(GL_VIEWPORT, viewport);  
     2616        glSelectBuffer(MaxSize, buffer);  
     2617        // enter select mode  
     2618        glRenderMode(GL_SELECT);  
     2619        glInitNames();  
     2620        glPushName(0);  
     2621        glMatrixMode(GL_PROJECTION);  
     2622        glPushMatrix();  
     2623        glLoadIdentity();  
     2624        gluPickMatrix((GLdouble)pos.x(), 215 (GLdouble)(viewport[3] - pos.y()), 216 5.0, 5.0, viewport);  
     2625        GLfloat x = (GLfloat)viewport_size.width() / viewport_size.height();  
     2626        glFrustum(-x, x, -1.0, 1.0, 4.0, 15.0);  
     2627        draw();  
     2628        glMatrixMode(GL_PROJECTION);  
     2629        glPopMatrix(); 
     2630        // finally release the rendering context again  
     2631        if (!glRenderMode(GL_RENDER))  
     2632        {  
     2633                glw.unlockGLContext();  
     2634                return -1;  
     2635        }  
     2636         
     2637        glw.unlockGLContext();  
     2638         
     2639        // Each hit takes 4 items in the buffer.  
     2640        // The first item is the number of names on the name stack when the hit occured.  
     2641        // The second item is the minimum z value of all the verticies that intersected 
     2642        // the viewing area at the time of the hit. The third item is the maximum z value  
     2643        // of all the vertices that intersected the viewing area at the time of the hit  
     2644        // and the last item is the content of the name stack at the time of the hit  
     2645        // (name of the object). We are only interested in the object name  
     2646        // (number of the surface).  
     2647        // return the name of the clicked surface  
     2648         
     2649        return buffer[3];  
     2650} 
     2651*/ 
     2652} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h

    r2694 r2695  
    7676        int ComputePvs(ObjectContainer &objects, ObjectContainer &pvs) const; 
    7777 
     78        /** quick hack in order to be able to render gvs pvs. 
     79        */ 
     80        void RenderTrianglePvs(); 
    7881 
    7982public: 
     
    260263        QtGlRendererWidget() {}; 
    261264 
    262         ~QtGlRendererWidget() { delete mPlacer; } 
     265        ~QtGlRendererWidget(); 
    263266 
    264267        void SetThread(QtPreprocessorThread *t) 
     
    266269                mPreprocessorThread = t; 
    267270        } 
     271 
    268272        void RenderRenderCost(); 
    269273 
    270274        virtual void SetupCamera(); 
    271275 
    272         void initializeGL() { 
     276        void initializeGL()  
     277        { 
    273278                InitGL(); 
    274279        } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/RandomViewCellsHandler.cpp

    r2686 r2695  
    139139        AxisAlignedBox3 bbox = mViewCellsManager->GetViewSpaceBox(); 
    140140 
    141         string buf; 
     141        cout << "old view space box: " << bbox << endl; 
     142 
     143        string buf; 
     144 
    142145        while (!(getline(inStream, buf)).eof()) 
    143146        { 
     
    161164                                sscanf(buf.c_str(), "p %f %f %f %f %f %f", &pt.x, &pt.y, &pt.z, &dir.x, &dir.y, &dir.z); 
    162165                                 
    163                                 if (0) 
    164                                 { 
    165                                         // add new point to view space box 
     166                                if (1) 
     167                                { 
     168                                        // include new point into view space box 
    166169                                        if (!bbox.IsInside(pt)) 
    167170                                                bbox.Include(pt); 
     
    194197        // set updated view space box containing all view points 
    195198        mViewCellsManager->SetViewSpaceBox(bbox); 
     199 
     200        cout << "new view space box: " << mViewCellsManager->GetViewSpaceBox() << endl; 
    196201 
    197202        return true; 
     
    278283                viewPoint =  box.GetPoint(pVector); 
    279284         
    280                 const Vector3 dVector = Vector3(2 * M_PI * Random(1.0f), M_PI * Random(1.0f), 0.0f); 
     285                const Vector3 dVector = Vector3(2.0f * M_PI * Random(1.0f), M_PI * Random(1.0f), 0.0f); 
    281286                direction = Normalize(Vector3(sin(dVector.x), 0.0f, cos(dVector.x))); 
    282287 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp

    r2694 r2695  
    822822 
    823823        // get point on view cell surface 
    824         if (0) 
     824        if (1) 
    825825        { 
    826826                //mViewCell->GetRandomEdgePoint(origin, normal); 
     
    829829                // move a little bit back to avoid piercing through walls 
    830830                // that bound the view cell 
    831                 if (0) origin -= 0.01f * normal; 
     831                if (1) origin -= 0.01f * normal; 
    832832        } 
    833833        else 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2690 r2695  
    22772277 
    22782278 
     2279void VspOspViewCellsManager::SetViewSpaceBox(const AxisAlignedBox3 &box) 
     2280{ 
     2281        mViewSpaceBox = box; 
     2282        mHierarchyManager->mVspTree->mBoundingBox = box; 
     2283 
     2284        cout << "vsp bounding box: " << box << endl; 
     2285        // hack: create clip plane relative to new view space box 
     2286        CreateClipPlane(); 
     2287        // the total area of the view space has changed 
     2288        mTotalAreaValid = false; 
     2289} 
     2290 
     2291 
    22792292void ViewCellsManager::CreateClipPlane() 
    22802293{ 
     
    62186231                if (exporter) 
    62196232                { 
    6220                         if (CLAMP_TO_BOX) 
    6221                         {        
    6222                                 exporter->mClampToBox = true;    
    6223                         } 
     6233                        if (CLAMP_TO_BOX) exporter->mClampToBox = true;          
    62246234 
    62256235                        const long starttime = GetTime(); 
     
    65346544        CreateUniqueViewCellIds(); 
    65356545 
    6536         int numBoxes = mPreprocessor->mKdTree->mKdIntersectables.size(); 
     6546        int numBoxes = (int)mPreprocessor->mKdTree->mKdIntersectables.size(); 
    65376547        stream.write(reinterpret_cast<char *>(&numBoxes), sizeof(int)); 
    65386548 
     
    65666576        //-- export the view cells and the pvs 
    65676577 
    6568         int numViewCells = mViewCells.size(); 
     6578        int numViewCells = (int)mViewCells.size(); 
    65696579        stream.write(reinterpret_cast<char *>(&numViewCells), sizeof(int)); 
    65706580 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r2690 r2695  
    362362        /** Sets a view space boundary. 
    363363        */ 
    364         void SetViewSpaceBox(const AxisAlignedBox3 &box); 
     364        virtual void SetViewSpaceBox(const AxisAlignedBox3 &box); 
    365365        /** Returns the boundaries of the view space. 
    366366        */ 
     
    12481248                                                           const ObjectContainer &objects); 
    12491249 
     1250        /** Sets a view space boundary. 
     1251        */ 
     1252        virtual void SetViewSpaceBox(const AxisAlignedBox3 &box); 
     1253 
    12501254#if TEST_PACKETS 
    12511255 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParser.cpp

    r2672 r2695  
    638638        mViewSpaceBox = AxisAlignedBox3(bmin, bmax); 
    639639 
     640        // hack for submission: enlarge by some margin 
     641        mViewSpaceBox.SetMax(1, mViewSpaceBox.Max().y + 40.0f); 
    640642        // create the hierarchy based on this information 
    641643        CreateViewSpaceHierarchy(); 
     
    922924 
    923925void ViewCellsParseHandlers::CreateViewSpaceHierarchy() 
    924 {cout<<"y"; 
     926{ 
    925927        if (mViewSpaceHierarchyType == BSP) 
    926928        { 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h

    r2176 r2695  
    722722        /// Pointer to the root of the tree 
    723723        BspNode *mRoot; 
    724          
    725724        /// the pointer to the view cells manager 
    726725        ViewCellsManager *mViewCellsManager; 
    727          
    728726        /// View cell corresponding to the space outside the valid view space 
    729727        BspViewCell *mOutOfBoundsCell; 
    730  
    731728        /// the bsp tree statistics 
    732729        BspTreeStatistics mBspStats; 
    733  
    734730        /// sorted split candidates used for sweep-heuristics 
    735731        vector<SortableEntry> *mLocalSubdivisionCandidates; 
    736  
    737732        /// box around the whole view domain 
    738733        AxisAlignedBox3 mBoundingBox; 
    739  
    740734        /// pointer to the hierarchy of view cells 
    741735        ViewCellsTree *mViewCellsTree; 
    742736 
    743737 
     738        /////////// 
    744739        //-- termination critera 
    745740 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h

    r2588 r2695  
    354354        friend class ViewCellsParseHandlers; 
    355355        friend class HierarchyManager; 
     356        friend class VspOspViewCellsManager; 
    356357 
    357358public: 
     
    552553        */  
    553554        VspTree(); 
    554         /** Constructor just setting the bounds of the tree. 
     555        /** Constructor setting the bounds of the tree. 
    555556        */  
    556557        VspTree(const AxisAlignedBox3 &bbox); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r2689 r2695  
    283283        } 
    284284 
    285  
     285        // create meshes of view cells 
     286        preprocessor->mViewCellsManager->FinalizeViewCells(true); 
     287 
     288        cout << "view space box: " << preprocessor->mViewCellsManager->GetViewSpaceBox() << endl; 
    286289        bool useHwGlobalLines; 
    287290        Environment::GetSingleton()->GetBoolValue("Preprocessor.useHwGlobalLines", 
Note: See TracChangeset for help on using the changeset viewer.