Changeset 827


Ignore:
Timestamp:
04/26/06 14:59:00 (18 years ago)
Author:
mattausch
Message:

created library from the preprocessor

Location:
GTP/trunk/Lib/Vis
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp

    r726 r827  
    7070         
    7171        return (mCameraPosition - pos).squaredLength(); 
     72        //return (mCullCamera->getDerivedPosition() - pos).squaredLength(); 
    7273} 
    7374//----------------------------------------------------------------------- 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/GtpVisibility.vcproj

    r662 r827  
    6262                        <Tool 
    6363                                Name="VCCLCompilerTool" 
     64                                OptimizeForWindowsApplication="TRUE" 
    6465                                AdditionalIncludeDirectories="..\include;&quot;$(OGRE_PATH)\OgreMain\include&quot;" 
    6566                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB" 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj

    r810 r827  
    5959                <Configuration 
    6060                        Name="Release|Win32" 
    61                         OutputDirectory="..\bin\$(ConfigurationName)" 
     61                        OutputDirectory="..\lib\$(ConfigurationName)" 
    6262                        IntermediateDirectory="..\obj\$(ConfigurationName)" 
    63                         ConfigurationType="1" 
     63                        ConfigurationType="4" 
    6464                        CharacterSet="2"> 
    6565                        <Tool 
    6666                                Name="VCCLCompilerTool" 
    67                                 InlineFunctionExpansion="2" 
    68                                 FavorSizeOrSpeed="1" 
     67                                InlineFunctionExpansion="0" 
     68                                FavorSizeOrSpeed="0" 
     69                                OptimizeForWindowsApplication="TRUE" 
    6970                                AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;..\src;&quot;$(CG_INC_PATH)&quot;;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces" 
    7071                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;" 
    71                                 RuntimeLibrary="2" 
     72                                ExceptionHandling="TRUE" 
     73                                RuntimeLibrary="0" 
    7274                                DisableLanguageExtensions="FALSE" 
    7375                                ForceConformanceInForLoopScope="FALSE" 
     
    8082                                Name="VCCustomBuildTool"/> 
    8183                        <Tool 
    82                                 Name="VCLinkerTool" 
    83                                 AdditionalDependencies="xerces-c_2.lib zdll.lib zziplib.lib devil.lib qtmain.lib QtOpenGL4.lib QtCore4.lib QtGui4.lib Qt3Supportd4.lib QAxContainer.lib glut32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib" 
    84                                 AdditionalLibraryDirectories="..\support\xercesc\lib\;..\support\zlib\lib\;..\support\devil\lib;&quot;$(QTDIR)\lib&quot;;..\include;..\src\GL;&quot;$(CG_LIB_PATH)&quot;;&quot;$(GTPDIR)\NonGTP\Xerces&quot;;&quot;$(GTPDIR)\NonGTP\Xerces\xercesc\lib&quot;;&quot;$(GTPDIR)\NonGTP\zlib\lib&quot;;&quot;$(GTPDIR)\NonGTP\Devil\lib&quot;" 
    85                                 GenerateDebugInformation="FALSE" 
    86                                 LargeAddressAware="2"/> 
     84                                Name="VCLibrarianTool"/> 
    8785                        <Tool 
    8886                                Name="VCMIDLTool"/> 
     
    9997                        <Tool 
    10098                                Name="VCXMLDataGeneratorTool"/> 
    101                         <Tool 
    102                                 Name="VCWebDeploymentTool"/> 
    10399                        <Tool 
    104100                                Name="VCManagedWrapperGeneratorTool"/> 
     
    205201                        </File> 
    206202                        <File 
    207                                 RelativePath="..\src\main.cpp"> 
    208                         </File> 
    209                         <File 
    210203                                RelativePath="..\src\Material.cpp"> 
    211204                        </File> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r822 r827  
    43694369        case 1: // pvs 
    43704370                { 
    4371                         importance = (float)mViewCellsTree->GetPvsSize(vc) / 
    4372 #if 1 // hack for result                         
    4373                                 (float)mCurrentViewCellsStats.maxPvs; 
    4374 #else 
    4375                                 463.0f; 
    4376 #endif 
     4371                        importance = (float)mViewCellsTree->GetPvsSize(vc) / (float)mCurrentViewCellsStats.maxPvs; 
    43774372                } 
    43784373                break; 
  • GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp

    r744 r827  
    191191 
    192192 
     193 
     194 
     195 
     196// evaluate number of view cells needed for same rendercost 
     197int EvalSingleNumViewCells(const StatsContainer &currentStats, 
     198                                                   const float cost) 
     199{ 
     200         
     201        StatsContainer::const_iterator it, it_end = currentStats.end(); 
     202 
     203        RenderStats dummy; dummy.mRenderCost = cost; 
     204         
     205        // find equivalent render cost in the other stats container. 
     206        // don't stop until cursor is placed one element behind 
     207        // or end of vector is reached 
     208        StatsContainer::const_iterator equalCostIt = std::upper_bound(currentStats.begin(),currentStats.end(), dummy, vlt); 
     209 
     210        int j = (int)(equalCostIt - currentStats.begin()); 
     211 
     212        return j; 
     213} 
     214 
     215 
     216 
    193217int _tmain(int argc, _TCHAR* argv[]) 
    194218{ 
     
    203227        vector<string> outFilenames; 
    204228        vector<string> outFilenames2; 
    205  
     229        vector<string> methodnames; 
    206230        // read input files from command line 
    207231        for (int i = 1; i < argc; ++ i) 
     
    227251                        string outFilename = string(fn) + string("-ratio.log"); 
    228252                        string outFilename2 = string(fn) + string("-reverse.log"); 
    229  
     253                         
    230254                        outFilenames.push_back(outFilename); 
    231255                        outFilenames2.push_back(outFilename2); 
     256                        methodnames.push_back(fn); 
     257 
    232258                        cout << "new filen: " << outFilename2 << endl; 
    233259                } 
     
    243269        vector<string>::const_iterator sit, sit_end = outFilenames.end(); 
    244270        vector<string>::const_iterator sit2, sit2_end = outFilenames2.end(); 
     271        vector<string>::const_iterator sit3, sit3_end = methodnames.end(); 
     272 
    245273 
    246274        sit = outFilenames.begin(); 
    247275        sit2 = outFilenames2.begin(); 
     276        sit3 = methodnames.begin(); 
    248277 
    249278        // compare all values with this vector 
     
    253282        //++ it; 
    254283        //++ sit; 
    255  
    256         for (it; it != it_end; ++ it, ++ sit, ++ sit2) 
     284        ofstream statsOut3; 
     285        statsOut3.open("numviewcells.log"); 
     286 
     287        for (it; it != it_end; ++ it, ++ sit, ++ sit2, ++sit3) 
    257288        { 
    258289                cout << "now writing output to file " << *sit << endl; 
     290 
    259291                ofstream statsOut; 
    260292                statsOut.open((*sit).c_str()); 
     293         
    261294                ofstream statsOut2; 
    262295                statsOut2.open((*sit2).c_str()); 
     
    275308                EvalNumViewCells(statsOut2, firstStats, (*it)); 
    276309 
     310                const float rendercost = 100; 
     311                const int j = EvalSingleNumViewCells(*it, rendercost); 
     312 
     313                statsOut3 << (*sit3).c_str() << " " << j << endl; 
     314 
    277315                statsOut.close(); 
    278316                statsOut2.close(); 
    279317        } 
    280318 
     319        statsOut3.close(); 
     320 
     321 
     322 
    281323        return 0; 
    282324} 
  • GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln

    r668 r827  
    2121Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EvalStats", "..\EvalStats\EvalStats.vcproj", "{935D1BDD-41B0-49F1-A86C-EB49B94DDB20}" 
    2222        ProjectSection(ProjectDependencies) = postProject 
     23        EndProjectSection 
     24EndProject 
     25Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPreprocessor", "..\..\Preprocessing\scripts\TestPreprocessor.vcproj", "{0D592644-5404-4054-8F11-CF0B178D286D}" 
     26        ProjectSection(ProjectDependencies) = postProject 
     27                {EABCE292-D598-4600-A1C9-2591E7D62FDA} = {EABCE292-D598-4600-A1C9-2591E7D62FDA} 
    2328        EndProjectSection 
    2429EndProject 
     
    4954                {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release.ActiveCfg = Release|Win32 
    5055                {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release.Build.0 = Release|Win32 
     56                {0D592644-5404-4054-8F11-CF0B178D286D}.Debug.ActiveCfg = Debug|Win32 
     57                {0D592644-5404-4054-8F11-CF0B178D286D}.Debug.Build.0 = Debug|Win32 
     58                {0D592644-5404-4054-8F11-CF0B178D286D}.Release.ActiveCfg = Release|Win32 
     59                {0D592644-5404-4054-8F11-CF0B178D286D}.Release.Build.0 = Release|Win32 
    5160        EndGlobalSection 
    5261        GlobalSection(ExtensibilityGlobals) = postSolution 
Note: See TracChangeset for help on using the changeset viewer.