Changeset 2231


Ignore:
Timestamp:
03/12/07 00:11:00 (17 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp

    r2206 r2231  
    153153                SetFilled(); 
    154154                 
    155                 if (0) 
     155                if (1) 
    156156                        ExportGeometry(leaf->mObjects, true, box); 
    157157                else 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r2228 r2231  
    844844         
    845845        // assume pvs sampled sufficiently => take child pvs 
    846         if (avgRaysPerObjects > mMaxAvgRaysPerObject) 
     846        if (avgRaysPerObjects >= mMaxAvgRaysPerObject) 
    847847        { 
    848848                return childPvs; 
     
    872872        const float newPvs = alpha * childPvs + (1.0f - alpha) * totalPvs; 
    873873#endif 
    874 cout << "b ";// << avgRaysPerObjects << " "; 
     874        cout << "b ";// << avgRaysPerObjects << " "; 
    875875        //cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl; 
    876876         
    877877        if ((newPvs < childPvs - Limits::Small) || (newPvs > totalPvs + Limits::Small)) 
    878                 cout << "Error! " << newPvs << " smaller than child pvs or larger than parent pvs" << endl; 
     878                cout << "w: " << newPvs << " < child ("  
     879                         << childPvs << ") or > parent (" << totalPvs << ")" << endl; 
    879880 
    880881        return newPvs; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.cpp

    r2206 r2231  
    104104                                                                                 Vector3 &normal)  
    105105{ 
    106         cerr << "GetRandomSurfacePoint(u,v...) not yet implemented" << endl; 
     106        cerr << "GetRandomSurfacePoint(u,v...) not yet implemented for type " << Type() << endl; 
    107107        return 1; 
    108108} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj

    r2228 r2231  
    186186                        IntermediateDirectory="bin\Release" 
    187187                        ConfigurationType="1" 
    188                         CharacterSet="2"> 
     188                        CharacterSet="2" 
     189                        WholeProgramOptimization="TRUE"> 
    189190                        <Tool 
    190191                                Name="VCCLCompilerTool" 
     
    214215                                Name="VCLinkerTool" 
    215216                                AdditionalDependencies="xerces-c_2.lib glew32.lib zdll.lib zziplib.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib Preprocessor.lib RTScene.lib RTWorld.lib QtCore4.lib qtmain.lib cg.lib cgGL.lib QtOpenGL4.lib Qt3Support4.lib QtTest4.lib QtGui4.lib QtInterface.lib" 
    216                                 OutputFile="../bin/release/Preprocessor.exe" 
     217                                OutputFile="../bin/release/Preprocessor2.exe" 
    217218                                LinkIncremental="1" 
    218219                                AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\Preprocessing\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;..\MultiLevelRayTracing\RTScene\Release;..\MultiLevelRayTracing\RTWorld\Release;&quot;$(QTDIR)\lib&quot;;.\QtInterface\Release;&quot;$(CG_LIB_PATH)&quot;" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2228 r2231  
    63326332        Exporter *exporter = Exporter::GetExporter("final_view_cells.wrl"); 
    63336333 
    6334         //Vector3 scale(0.9f, 0.9f, 0.9f); 
    6335         Vector3 scale(1.0f, 1.0f, 1.0f); 
     6334        Vector3 scale(0.9f, 0.9f, 0.9f); 
     6335        //Vector3 scale(1.0f, 1.0f, 1.0f); 
    63366336 
    63376337        if (exporter) 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r2228 r2231  
    3030 
    3131 
     32#define VISUALIZE_SPLIT 0 
    3233#define USE_FIXEDPOINT_T 0 
    3334 
     
    13431344 
    13441345#endif 
    1345 #if VISUALIZE_SPLIT 
    1346         Exporter *exporter = Exporter::GetExporter("split.wrl"); 
    1347         exporter->ExportBox(box); 
    1348  
    1349                 RayInfoContainer::const_iterator rit, rit_end = tData.mRays->end(); 
    1350  
    1351         for (rit = tData.mRays->begin(); rit != rit_end; ++ rit) 
    1352         { 
    1353                 RayInfo rayInf = *rit; 
    1354  
    1355                 VssRay *ray = rayInf.mRay; 
    1356                  
    1357                 exporter->ExportIntersectable(GetParentObject(ray->mTerminationObject)); 
    1358  
    1359                 AxisAlignedBox3 candidatePlane; 
    1360                 exporter->ExportBox(candidatePlane); 
    1361         } 
    1362     delete exporter; 
    1363 #endif 
     1346 
     1347 
    13641348        for (ci = mLocalSubdivisionCandidates->begin(); ci != ci_end; ++ ci) 
    13651349        { 
     
    14251409        const float newRenderCost = penaltyFront * pFront + penaltyBack * pBack; 
    14261410 
     1411#if VISUALIZE_SPLIT 
     1412         
     1413        const int leaves = mVspStats.Leaves(); 
     1414        const bool showViz = ((axis == 0) && (leaves == 500)); 
     1415 
     1416        if (showViz) 
     1417        { 
     1418                Exporter *exporter; 
     1419 
     1420                exporter = Exporter::GetExporter("split.wrl"); 
     1421                exporter->SetWireframe(); 
     1422 
     1423                exporter->ExportBox(tData.mBoundingBox); 
     1424 
     1425                RayInfoContainer::const_iterator rit, rit_end = tData.mRays->end(); 
     1426 
     1427                exporter->SetFilled(); 
     1428         
     1429                for (rit = tData.mRays->begin(); rit != rit_end; ++ rit) 
     1430                { 
     1431                        RayInfo rayInf = *rit; 
     1432 
     1433                        // export objects 
     1434                        VssRay *ray = rayInf.mRay;       
     1435                        BvhLeaf *leaf = mBvHierarchy->GetLeaf(ray->mTerminationObject); 
     1436                        exporter->ExportIntersectable(leaf); 
     1437 
     1438                } 
     1439 
     1440                AxisAlignedBox3 vizPlaneBox; 
     1441                vizPlaneBox = tData.mBoundingBox; 
     1442         
     1443                Vector3 scale(1, 1, 1); scale[axis] = 0.05f; 
     1444                vizPlaneBox.Scale(scale); 
     1445                exporter->ExportBox(vizPlaneBox); 
     1446 
     1447                delete exporter; 
     1448        } 
     1449 
     1450#endif 
     1451 
    14271452        if (splitPlaneFound) 
    14281453        { 
     
    14301455        } 
    14311456         
     1457 
    14321458#ifdef GTP_DEBUG 
    14331459        cout << "\n((((( eval local cost )))))" << endl 
     
    14371463                  << "render cost decrease: " << oldRenderCost * volRatio - newRenderCost * volRatio << endl; 
    14381464#endif 
     1465 
    14391466        return ratio; 
    14401467} 
Note: See TracChangeset for help on using the changeset viewer.