Ignore:
Timestamp:
05/08/07 13:04:43 (17 years ago)
Author:
mattausch
Message:

cleaned up project files

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

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/EvalStats/EvalStats.vcproj

    r2280 r2353  
    106106                </Configuration> 
    107107                <Configuration 
    108                         Name="mlrt|Win32" 
    109                         OutputDirectory="$(ConfigurationName)" 
    110                         IntermediateDirectory="$(ConfigurationName)" 
    111                         ConfigurationType="1" 
    112                         CharacterSet="2"> 
    113                         <Tool 
    114                                 Name="VCCLCompilerTool" 
    115                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 
    116                                 RuntimeLibrary="0" 
    117                                 UsePrecompiledHeader="3" 
    118                                 WarningLevel="3" 
    119                                 Detect64BitPortabilityProblems="TRUE" 
    120                                 DebugInformationFormat="3"/> 
    121                         <Tool 
    122                                 Name="VCCustomBuildTool"/> 
    123                         <Tool 
    124                                 Name="VCLinkerTool" 
    125                                 OutputFile="$(OutDir)/EvalStats.exe" 
    126                                 LinkIncremental="1" 
    127                                 GenerateDebugInformation="TRUE" 
    128                                 SubSystem="1" 
    129                                 OptimizeReferences="2" 
    130                                 EnableCOMDATFolding="2" 
    131                                 TargetMachine="1"/> 
    132                         <Tool 
    133                                 Name="VCMIDLTool"/> 
    134                         <Tool 
    135                                 Name="VCPostBuildEventTool"/> 
    136                         <Tool 
    137                                 Name="VCPreBuildEventTool"/> 
    138                         <Tool 
    139                                 Name="VCPreLinkEventTool"/> 
    140                         <Tool 
    141                                 Name="VCResourceCompilerTool"/> 
    142                         <Tool 
    143                                 Name="VCWebServiceProxyGeneratorTool"/> 
    144                         <Tool 
    145                                 Name="VCXMLDataGeneratorTool"/> 
    146                         <Tool 
    147                                 Name="VCWebDeploymentTool"/> 
    148                         <Tool 
    149                                 Name="VCManagedWrapperGeneratorTool"/> 
    150                         <Tool 
    151                                 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
    152                 </Configuration> 
    153                 <Configuration 
    154                         Name="Release_Internal|Win32" 
    155                         OutputDirectory="$(ConfigurationName)" 
    156                         IntermediateDirectory="$(ConfigurationName)" 
    157                         ConfigurationType="1" 
    158                         CharacterSet="2"> 
    159                         <Tool 
    160                                 Name="VCCLCompilerTool" 
    161                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 
    162                                 RuntimeLibrary="0" 
    163                                 UsePrecompiledHeader="3" 
    164                                 WarningLevel="3" 
    165                                 Detect64BitPortabilityProblems="TRUE" 
    166                                 DebugInformationFormat="3"/> 
    167                         <Tool 
    168                                 Name="VCCustomBuildTool"/> 
    169                         <Tool 
    170                                 Name="VCLinkerTool" 
    171                                 OutputFile="$(OutDir)/EvalStats.exe" 
    172                                 LinkIncremental="1" 
    173                                 GenerateDebugInformation="TRUE" 
    174                                 SubSystem="1" 
    175                                 OptimizeReferences="2" 
    176                                 EnableCOMDATFolding="2" 
    177                                 TargetMachine="1"/> 
    178                         <Tool 
    179                                 Name="VCMIDLTool"/> 
    180                         <Tool 
    181                                 Name="VCPostBuildEventTool"/> 
    182                         <Tool 
    183                                 Name="VCPreBuildEventTool"/> 
    184                         <Tool 
    185                                 Name="VCPreLinkEventTool"/> 
    186                         <Tool 
    187                                 Name="VCResourceCompilerTool"/> 
    188                         <Tool 
    189                                 Name="VCWebServiceProxyGeneratorTool"/> 
    190                         <Tool 
    191                                 Name="VCXMLDataGeneratorTool"/> 
    192                         <Tool 
    193                                 Name="VCWebDeploymentTool"/> 
    194                         <Tool 
    195                                 Name="VCManagedWrapperGeneratorTool"/> 
    196                         <Tool 
    197                                 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
    198                 </Configuration> 
    199                 <Configuration 
    200108                        Name="Release Internal|Win32" 
    201                         OutputDirectory="..\bin\Release" 
    202                         IntermediateDirectory="..\obj\Release" 
     109                        OutputDirectory="Release" 
     110                        IntermediateDirectory="Release" 
    203111                        ConfigurationType="1" 
    204112                        CharacterSet="2"> 
     
    226134                                OutputFile="$(OutDir)/EvalStats.exe" 
    227135                                LinkIncremental="1" 
    228                                 GenerateDebugInformation="TRUE" 
     136                                GenerateDebugInformation="FALSE" 
    229137                                SubSystem="1" 
    230138                                OptimizeReferences="2" 
     
    255163                <Configuration 
    256164                        Name="Release_qt|Win32" 
    257                         OutputDirectory="$(ConfigurationName)" 
    258                         IntermediateDirectory="$(ConfigurationName)" 
     165                        OutputDirectory="Release" 
     166                        IntermediateDirectory="Release" 
    259167                        ConfigurationType="1" 
    260168                        CharacterSet="2"> 
     
    274182                                LinkIncremental="1" 
    275183                                GenerateDebugInformation="TRUE" 
     184                                SubSystem="1" 
     185                                OptimizeReferences="2" 
     186                                EnableCOMDATFolding="2" 
     187                                TargetMachine="1"/> 
     188                        <Tool 
     189                                Name="VCMIDLTool"/> 
     190                        <Tool 
     191                                Name="VCPostBuildEventTool"/> 
     192                        <Tool 
     193                                Name="VCPreBuildEventTool"/> 
     194                        <Tool 
     195                                Name="VCPreLinkEventTool"/> 
     196                        <Tool 
     197                                Name="VCResourceCompilerTool"/> 
     198                        <Tool 
     199                                Name="VCWebServiceProxyGeneratorTool"/> 
     200                        <Tool 
     201                                Name="VCXMLDataGeneratorTool"/> 
     202                        <Tool 
     203                                Name="VCWebDeploymentTool"/> 
     204                        <Tool 
     205                                Name="VCManagedWrapperGeneratorTool"/> 
     206                        <Tool 
     207                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
     208                </Configuration> 
     209                <Configuration 
     210                        Name="Release_noqt|Win32" 
     211                        OutputDirectory="Release" 
     212                        IntermediateDirectory="Release" 
     213                        ConfigurationType="1" 
     214                        CharacterSet="2"> 
     215                        <Tool 
     216                                Name="VCCLCompilerTool" 
     217                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 
     218                                RuntimeLibrary="0" 
     219                                UsePrecompiledHeader="3" 
     220                                WarningLevel="3" 
     221                                Detect64BitPortabilityProblems="TRUE" 
     222                                DebugInformationFormat="3"/> 
     223                        <Tool 
     224                                Name="VCCustomBuildTool"/> 
     225                        <Tool 
     226                                Name="VCLinkerTool" 
     227                                OutputFile="Release/EvalStats.exe" 
     228                                LinkIncremental="1" 
     229                                GenerateDebugInformation="FALSE" 
    276230                                SubSystem="1" 
    277231                                OptimizeReferences="2" 
     
    325279                                </FileConfiguration> 
    326280                                <FileConfiguration 
    327                                         Name="mlrt|Win32"> 
    328                                         <Tool 
    329                                                 Name="VCCLCompilerTool" 
    330                                                 UsePrecompiledHeader="1"/> 
    331                                 </FileConfiguration> 
    332                                 <FileConfiguration 
    333                                         Name="Release_Internal|Win32"> 
    334                                         <Tool 
    335                                                 Name="VCCLCompilerTool" 
    336                                                 UsePrecompiledHeader="1"/> 
    337                                 </FileConfiguration> 
    338                                 <FileConfiguration 
    339281                                        Name="Release Internal|Win32"> 
    340282                                        <Tool 
     
    344286                                <FileConfiguration 
    345287                                        Name="Release_qt|Win32"> 
     288                                        <Tool 
     289                                                Name="VCCLCompilerTool" 
     290                                                UsePrecompiledHeader="1"/> 
     291                                </FileConfiguration> 
     292                                <FileConfiguration 
     293                                        Name="Release_noqt|Win32"> 
    346294                                        <Tool 
    347295                                                Name="VCCLCompilerTool" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r2342 r2353  
    285285 
    286286        // split was not reevaluated before => do it now 
    287         if (splitCandidate->IsDirty()) 
     287        // matt: for new evaluation method, we cannot be sure if the candidate is dirty, 
     288        // so ALWAYS reevaluate 
     289        if (1 || splitCandidate->IsDirty()) 
    288290        { 
    289291                splitCandidate->EvalCandidate(); 
     
    25092511} 
    25102512 
    2511 #ifdef USE_SSE 
     2513 
    25122514int HierarchyManager::CastLineSegment(RayPacket &packet) 
    25132515{ 
     
    25152517} 
    25162518 
    2517 #endif 
    2518  
    2519 } 
     2519 
     2520} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h

    r2347 r2353  
    318318                                                const bool useMailboxing = true); 
    319319 
    320 #ifdef USE_SSE 
    321320        int CastLineSegment(RayPacket &packet); 
    322 #endif 
    323321 
    324322 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp

    r2210 r2353  
    4949  //    cout<<mRays[i].mMutations<<" "; 
    5050  //  cout<<endl; 
    51   cerr<<"Muattion update..."<<endl; 
     51  cerr<<"Mutation update..."<<endl; 
    5252  cerr<<"rays = "<<mRays.size()<<endl; 
    5353  if ((int)mRays.size()) { 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj

    r2342 r2353  
    8080                                UsePrecompiledHeader="0" 
    8181                                BrowseInformation="1" 
    82                                 WarningLevel="2" 
    83                                 Detect64BitPortabilityProblems="TRUE" 
    84                                 DebugInformationFormat="3"/> 
    85                         <Tool 
    86                                 Name="VCCustomBuildTool"/> 
    87                         <Tool 
    88                                 Name="VCLibrarianTool"/> 
    89                         <Tool 
    90                                 Name="VCMIDLTool"/> 
    91                         <Tool 
    92                                 Name="VCPostBuildEventTool"/> 
    93                         <Tool 
    94                                 Name="VCPreBuildEventTool"/> 
    95                         <Tool 
    96                                 Name="VCPreLinkEventTool"/> 
    97                         <Tool 
    98                                 Name="VCResourceCompilerTool"/> 
    99                         <Tool 
    100                                 Name="VCWebServiceProxyGeneratorTool"/> 
    101                         <Tool 
    102                                 Name="VCXMLDataGeneratorTool"/> 
    103                         <Tool 
    104                                 Name="VCManagedWrapperGeneratorTool"/> 
    105                         <Tool 
    106                                 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
    107                 </Configuration> 
    108                 <Configuration 
    109                         Name="Release_Internal|Win32" 
    110                         OutputDirectory="$(ConfigurationName)" 
    111                         IntermediateDirectory="$(ConfigurationName)" 
    112                         ConfigurationType="4" 
    113                         CharacterSet="2"> 
    114                         <Tool 
    115                                 Name="VCCLCompilerTool" 
    116                                 Optimization="0" 
    117                                 InlineFunctionExpansion="0" 
    118                                 FavorSizeOrSpeed="0" 
    119                                 OptimizeForWindowsApplication="TRUE" 
    120                                 AdditionalIncludeDirectories="..\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;&quot;$(BOOST_INCLUDE)&quot;;..\..\Preprocessing\MultiLevelRayTracing" 
    121                                 PreprocessorDefinitions="WIN32;NDEBUG;_LIB" 
    122                                 ExceptionHandling="TRUE" 
    123                                 RuntimeLibrary="2" 
    124                                 DisableLanguageExtensions="FALSE" 
    125                                 ForceConformanceInForLoopScope="FALSE" 
    126                                 RuntimeTypeInfo="TRUE" 
    127                                 UsePrecompiledHeader="0" 
    12882                                WarningLevel="2" 
    12983                                Detect64BitPortabilityProblems="TRUE" 
     
    270224                </Configuration> 
    271225                <Configuration 
    272                         Name="Release_Qt|Win32" 
     226                        Name="Release_qt|Win32" 
    273227                        OutputDirectory="..\lib\Release" 
    274228                        IntermediateDirectory="..\obj\Release" 
     
    627581                                <FileConfiguration 
    628582                                        Name="Release|Win32"> 
    629                                         <Tool 
    630                                                 Name="VCCustomBuildTool" 
    631                                                 Description="" 
    632                                                 CommandLine="" 
    633                                                 Outputs=""/> 
    634                                 </FileConfiguration> 
    635                                 <FileConfiguration 
    636                                         Name="Release_Internal|Win32"> 
    637583                                        <Tool 
    638584                                                Name="VCCustomBuildTool" 
     
    658604                                </FileConfiguration> 
    659605                                <FileConfiguration 
    660                                         Name="Release_Qt|Win32"> 
     606                                        Name="Release_qt|Win32"> 
    661607                                        <Tool 
    662608                                                Name="VCCustomBuildTool" 
     
    679625                                <FileConfiguration 
    680626                                        Name="Release|Win32"> 
    681                                         <Tool 
    682                                                 Name="VCCustomBuildTool" 
    683                                                 Description="" 
    684                                                 CommandLine="" 
    685                                                 Outputs=""/> 
    686                                 </FileConfiguration> 
    687                                 <FileConfiguration 
    688                                         Name="Release_Internal|Win32"> 
    689627                                        <Tool 
    690628                                                Name="VCCustomBuildTool" 
     
    710648                                </FileConfiguration> 
    711649                                <FileConfiguration 
    712                                         Name="Release_Qt|Win32"> 
     650                                        Name="Release_qt|Win32"> 
    713651                                        <Tool 
    714652                                                Name="VCCustomBuildTool" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp

    r2227 r2353  
    496496} 
    497497 
    498   // add contributions of the sample to the strategies 
     498 
     499#if TEST_PACKETS 
     500 
     501// add contributions of the sample to the strategies 
     502void MixtureDistribution::ComputeContributions(VssRayContainer &vssRays) 
     503{ 
     504        int i; 
     505 
     506        mPreprocessor.mViewCellsManager->ComputeSampleContributions(vssRays, true, false); 
     507 
     508        VssRayContainer::iterator it = vssRays.begin(); 
     509 
     510        for (i=0; i < mDistributions.size(); i++) { 
     511                mDistributions[i]->mContribution = 0; 
     512                mDistributions[i]->mRays = 0; 
     513        } 
     514 
     515        for(; it != vssRays.end(); ++ it)  
     516        { 
     517                VssRay *ray = *it; 
     518 
     519                for (i = 0; i < mDistributions.size() - 1; ++ i)  
     520                { 
     521                        if (mDistributions[i]->mType == ray->mDistribution) 
     522                                break; 
     523                } 
     524 
     525                float contribution = 
     526                        mPreprocessor.mViewCellsManager->ComputeSampleContribution(*ray, true, false); 
     527 
     528                mDistributions[i]->mContribution += contribution; 
     529                mDistributions[i]->mRays ++; 
     530 
     531                mDistributions[i]->mTotalContribution += contribution; 
     532                mDistributions[i]->mTotalRays ++; 
     533        } 
     534 
     535        UpdateRatios(); 
     536 
     537 
     538        const float vcTime = viewCellCastTimer.TotalTime(); 
     539        const float pvsTime = pvsTimer.TotalTime(); 
     540        const float haltonTime = haltonTimer.TotalTime(); 
     541 
     542        cout << "view cell cast time: " << vcTime << " s" << endl; 
     543        cout << "pvs time: " << pvsTime << " s" << endl; 
     544        cout << "halton time: "<< haltonTime << " s" << endl; 
     545 
     546        Debug << "view cell cast time: " << vcTime << " s" << endl; 
     547        Debug << "pvs time: " << pvsTime << " s" << endl; 
     548        Debug << "halton time: "<< haltonTime << " s" << endl; 
     549} 
     550 
     551 
     552#else 
     553 
     554// add contributions of the sample to the strategies 
    499555void 
    500556MixtureDistribution::ComputeContributions(VssRayContainer &vssRays) 
    501557{ 
    502   int i; 
    503    
    504   VssRayContainer::iterator it = vssRays.begin(); 
    505  
    506   for (i=0; i < mDistributions.size(); i++) { 
    507         mDistributions[i]->mContribution = 0; 
    508         mDistributions[i]->mRays = 0; 
    509   } 
    510  
    511   for(; it != vssRays.end(); ++it) { 
    512         VssRay *ray = *it; 
    513         for (i=0; i < mDistributions.size()-1; i++) { 
    514           if (mDistributions[i]->mType == ray->mDistribution) 
    515                 break; 
    516         } 
    517   
    518         float contribution = 
    519           mPreprocessor.mViewCellsManager->ComputeSampleContribution(*ray, 
    520                                                                                                                                  true, 
    521                                                                                                                                  false); 
    522  
    523         mDistributions[i]->mContribution += contribution; 
    524         mDistributions[i]->mRays ++; 
    525          
    526         mDistributions[i]->mTotalContribution += contribution; 
    527         mDistributions[i]->mTotalRays ++; 
    528   } 
    529  
    530 #if 0 
    531   pvsTimer.Entry(); 
    532   // resort pvss 
    533   mPreprocessor.mViewCellsManager->SortViewCellPvs(); 
    534   pvsTimer.Exit(); 
     558        int i; 
     559 
     560        VssRayContainer::iterator it = vssRays.begin(); 
     561 
     562        for (i=0; i < mDistributions.size(); i++) { 
     563                mDistributions[i]->mContribution = 0; 
     564                mDistributions[i]->mRays = 0; 
     565        } 
     566 
     567        for(; it != vssRays.end(); ++it) { 
     568                VssRay *ray = *it; 
     569                for (i=0; i < mDistributions.size()-1; i++) { 
     570                        if (mDistributions[i]->mType == ray->mDistribution) 
     571                                break; 
     572                } 
     573 
     574                float contribution = 
     575                        mPreprocessor.mViewCellsManager->ComputeSampleContribution(*ray, 
     576                        true, 
     577                        false); 
     578 
     579                mDistributions[i]->mContribution += contribution; 
     580                mDistributions[i]->mRays ++; 
     581 
     582                mDistributions[i]->mTotalContribution += contribution; 
     583                mDistributions[i]->mTotalRays ++; 
     584        } 
     585 
     586        UpdateRatios(); 
     587 
     588 
     589  if (1) 
     590  { 
     591          const float vcTime = viewCellCastTimer.TotalTime(); 
     592          const float pvsTime = pvsTimer.TotalTime(); 
     593          const float haltonTime = haltonTimer.TotalTime(); 
     594 
     595          cout << "view cell cast time: " << vcTime << " s" << endl; 
     596          cout << "pvs time: " << pvsTime << " s" << endl; 
     597          cout << "halton time: "<< haltonTime << " s" << endl; 
     598 
     599          Debug << "view cell cast time: " << vcTime << " s" << endl; 
     600          Debug << "pvs time: " << pvsTime << " s" << endl; 
     601          Debug << "halton time: "<< haltonTime << " s" << endl; 
     602  } 
     603} 
     604 
    535605#endif 
    536606 
    537    
    538   UpdateRatios(); 
    539  
    540 #if 1 
    541   const float vcTime = viewCellCastTimer.TotalTime(); 
    542   const float pvsTime = pvsTimer.TotalTime(); 
    543   const float haltonTime = haltonTimer.TotalTime(); 
    544  
    545   cout << "view cell cast time: " << vcTime << " s" << endl; 
    546   cout << "pvs time: " << pvsTime << " s" << endl; 
    547   cout << "halton time: "<< haltonTime << " s" << endl; 
    548   // cout<<"obj time:"<<objTimer.TotalTime()<<" s"<<endl; 
    549  
    550   Debug << "view cell cast time: " << vcTime << " s" << endl; 
    551   Debug << "pvs time: " << pvsTime << " s" << endl; 
    552   Debug << "halton time: "<< haltonTime << " s" << endl; 
    553 #endif 
    554 } 
    555607 
    556608void 
  • GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj

    r2347 r2353  
    212212                                OptimizeForProcessor="1" 
    213213                                OptimizeForWindowsApplication="TRUE" 
    214                                 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;" 
     214                                AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces" 
    215215                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;NO_QT;USE_SSE" 
    216216                                RuntimeLibrary="2" 
     
    226226                                Name="VCLinkerTool" 
    227227                                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" 
    228                                 OutputFile="../bin/release/Preprocessor2.exe" 
     228                                OutputFile="../bin/release/Preprocessor.exe" 
    229229                                LinkIncremental="1" 
    230230                                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" 
     
    258258                </Configuration> 
    259259                <Configuration 
    260                         Name="Release_Qt|Win32" 
     260                        Name="Release_qt|Win32" 
    261261                        OutputDirectory="..\bin\Release" 
    262262                        IntermediateDirectory="..\obj\Release" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2351 r2353  
    66526652        stream << "</ViewCells>" << endl; 
    66536653 
     6654 
    66546655        ////////////////////// 
    66556656        //-- export the view space hierarchy 
     
    68086809} 
    68096810 
    6810  
    6811 #if 1 
    68126811 
    68136812void VspOspViewCellsManager::EvalViewCellPartition() 
     
    68986897                        Debug << "statistics computed in " << timeDiff * 1e-3 << " secs" << endl; 
    68996898 
    6900 #if 0 
    6901                         ////////////// 
    6902                         // filtered stats 
    6903  
    6904                         sprintf(suffix, "-%09d-eval-filter.log", castSamples); 
    6905                         const string filename2 = string(statsPrefix) + string(suffix); 
    6906  
    6907                         startTime = GetTime(); 
    6908                          
    6909                         cout << "compute new statistics for filtered pvs ... " << endl; 
    6910  
    6911                         ofstream ofstr2(filename2.c_str()); 
    6912                         mHierarchyManager->EvaluateSubdivision2(ofstr2, splitsStepSize, true); 
    6913  
    6914                         timeDiff = TimeDiff(startTime, GetTime()); 
    6915                         cout << "finished in " << timeDiff * 1e-3 << " secs" << endl; 
    6916                         cout << "*************************************" << endl; 
    6917                         Debug << "filtered statistics computed in " << timeDiff * 1e-3 << " secs" << endl; 
    6918 #endif 
    6919  
    6920                         // only for debugging purpose 
    6921                         if (0) 
    6922                         { 
    6923                                 ViewCellContainer viewCells; 
    6924                                 mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), viewCells); 
    6925  
    6926                                 ViewCellContainer::const_iterator vit, vit_end = viewCells.end(); 
    6927                                 int pvsSize = 0; 
    6928  
    6929                                 for (vit = viewCells.begin(); vit != vit_end; ++ vit) 
    6930                                 { 
    6931                                         pvsSize += (*vit)->GetPvs().GetSize(); 
    6932                                 } 
    6933  
    6934                                 cout << "debug entries: " << pvsSize << ", memcost: "  
    6935                                          << (float)pvsSize * ObjectPvs::GetEntrySize() << endl; 
    6936                         } 
    69376899                        ++ pass; 
    69386900                } 
     
    69596921 
    69606922                //for (int pass = histoStepSize; pass <= numLeaves; pass += histoStepSize) 
    6961                 if (1) 
    6962                 { 
    6963                         string filename; 
    6964  
    6965                         cout << "computing histogram for " << pass << " view cells" << endl; 
    6966  
    6967                         ////////////////////////////////////////// 
    6968             //-- evaluate histogram for pvs size 
    6969  
    6970                         cout << "computing pvs histogram for " << pass << " view cells" << endl; 
    6971  
    6972                         sprintf(str, "-%09d-histo-pvs2.log", pass); 
    6973                         filename = string(statsPrefix) + string(str); 
    6974  
    6975                         EvalViewCellHistogramForPvsSize(filename, pass); 
    6976                 } 
    6977         } 
    6978 } 
    6979  
    6980 #endif 
     6923 
     6924                string filename; 
     6925 
     6926                cout << "computing histogram for " << pass << " view cells" << endl; 
     6927 
     6928                ///////////////////////////// 
     6929                //-- evaluate histogram for pvs size 
     6930 
     6931                cout << "computing pvs histogram for " << pass << " view cells" << endl; 
     6932 
     6933                sprintf(str, "-%09d-histo-pvs2.log", pass); 
     6934                filename = string(statsPrefix) + string(str); 
     6935 
     6936                EvalViewCellHistogramForPvsSize(filename, pass); 
     6937        } 
     6938} 
     6939 
    69816940 
    69826941void VspOspViewCellsManager::FinalizeViewCells(const bool createMesh) 
     
    69936952 
    69946953#if TEST_PACKETS 
    6995 #ifdef USE_SSE 
    6996  
    6997 float ViewCellsManager::ComputeSampleContributions(const VssRayContainer &rays, 
    6998                                                                                                    const bool addContributions, 
    6999                                                                                                    const bool storeViewCells, 
    7000                                                                                                    const bool useHitObjects) 
    7001 { 
     6954 
     6955float VspOspViewCellsManager::ComputeSampleContributions(const VssRayContainer &rays, 
     6956                                                                                                                 const bool addContributions, 
     6957                                                                                                                 const bool storeViewCells, 
     6958                                                                                                                 const bool useHitObjects) 
     6959{ 
     6960        if (!ViewCellsConstructed())  
     6961                return 0; 
     6962         
    70026963        float sum = 0.0f; 
    7003  
    70046964        VssRayContainer::const_iterator it, it_end = rays.end(); 
    70056965 
    70066966        VssRayContainer tmpRays;         
    7007         RayPacket packet; 
    70086967 
    70096968        for (it = rays.begin(); it != it_end; ++ it)  
    70106969        { 
    7011                 if (!ViewCellsConstructed())  
    7012                 { 
    7013                         // view cells not yet constructed 
    7014                         // just take the lenghts of the rays as contributions 
    7015                         if ((*it)->mTerminationObject) 
     6970                sum += ComputeSampleContribution(*(*it), addContributions, storeViewCells, useHitObjects); 
     6971 
     6972                tmpRays.push_back(new VssRay(*(*it))); 
     6973                 
     6974                if (tmpRays.size() == 4) 
     6975                { 
     6976                        // cast packets of 4 rays 
     6977                        RayPacket packet(tmpRays); 
     6978                        mHierarchyManager->CastLineSegment(packet); 
     6979                 
     6980                        for (int i = 0; i < 4; ++ i) 
    70166981                        { 
    7017                                 sum += (*it)->Length(); 
     6982                                ComputeSampleContribution(*tmpRays[i], addContributions, true, useHitObjects); 
     6983 
     6984                                ////////// 
     6985                                // compare results 
     6986 
     6987                                cout << "ray " << i << ": " << (int)tmpRays[i]->mViewCells.size() << " " << (int)packet.mViewCells[i].size() << endl; 
    70186988                        } 
    7019                 }  
    7020                 else  
    7021                 { 
    7022                         sum += ComputeSampleContribution(*(*it), addContributions, storeViewCells, useHitObjects); 
    7023  
    7024                         tmpRays.push_back(new VssRay(*it)); 
     6989 
    70256990                         
    7026                         if (tmpRays.size() == 4) 
    7027                         { 
    7028                                 // cast packets of 4 rays 
    7029                                 RayPacket packet(tmpRays); 
    7030                                 mHierarchyManager->CastLineSegment(packet); 
    7031  
    7032                                 for (int i = 0; i < 4; ++ i) 
    7033                                 { 
    7034                                         ComputeSampleContribution(tmpRays[i], addContributions, true, useHitObjects); 
    7035                                 } 
    7036  
    7037                                 // compare results 
    7038                                 ////////// 
    7039  
    7040                                 CLEAR_CONTAINER(tmpRays); 
    7041                         } 
    7042                 } 
    7043         } 
     6991                         
     6992                        CLEAR_CONTAINER(tmpRays); 
     6993                } 
     6994        } 
     6995cout << "=================\nhere6"<<endl; 
     6996        CLEAR_CONTAINER(tmpRays); 
    70446997 
    70456998        cout << "view cell cast time: " << viewCellCastTimer.TotalTime() << " s" << endl; 
     
    70537006 
    70547007#endif 
    7055 #endif 
    7056  
    7057 } 
     7008 
     7009 
     7010} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r2332 r2353  
    12251225}; 
    12261226 
    1227 #define TEST_EVALUATION 0 
    1228  
    1229 /** 
    1230         Manages different higher order operations on the view cells. 
     1227 
     1228 
     1229/**     Manages different higher order operations on the view cells. 
    12311230*/ 
    12321231class VspOspViewCellsManager: public ViewCellsManager 
     
    13011300 
    13021301#if TEST_PACKETS 
    1303 #ifdef USE_SSE 
    1304  
    1305         float ViewCellsManager::ComputeSampleContributions(const VssRayContainer &rays, 
    1306                                                                const bool addContributions, 
    1307                                                                                                            const bool storeViewCells, 
    1308                                                                                                            const bool useHitObjects); 
    1309  
     1302 
     1303        float ComputeSampleContributions(const VssRayContainer &rays, 
     1304                                             const bool addContributions, 
     1305                                                                         const bool storeViewCells, 
     1306                                                                         const bool useHitObjects = false); 
    13101307#endif 
    1311 #endif 
    13121308 
    13131309protected: 
     
    13151311        VspOspViewCellsManager(ViewCellsTree *vcTree, HierarchyManager *hm); 
    13161312         
    1317 #if 1//TEST_EVALUATION 
    13181313        virtual void EvalViewCellPartition(); 
    1319 #endif 
    13201314 
    13211315        /** Exports view cell geometry. 
     
    13491343        static HierarchyManager *CreateHierarchyManager(const string &name); 
    13501344 
    1351         //void ExportStats(const string &mergeStats); 
    1352  
    13531345        /** collect objects intersecting a given spatial box  
    13541346        */ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r2351 r2353  
    16231623 
    16241624        const float oldRenderCost = penaltyOld * pOverall; 
    1625         const float newRenderCost = sc.mCorrectedFrontRenderCost * pFront +  
    1626                                                                 sc.mCorrectedBackRenderCost * pBack; 
     1625        const float newRenderCost = sc.mCorrectedFrontRenderCost * pFront + sc.mCorrectedBackRenderCost * pBack; 
    16271626 
    16281627 
     
    16341633 
    16351634#if GTP_DEBUG 
    1636         Debug << "old: " << normalizedOldRenderCost << " new: " << newRenderCost / viewSpaceVol << " corr: " << tData.mCorrectedRenderCost << " ratio: " << oldRenderCostRatio << endl; 
     1635        Debug << "old: " << normalizedOldRenderCost << " new: " << newRenderCost / viewSpaceVol  
     1636                  << " corr: " << tData.mCorrectedRenderCost << " ratio: " << oldRenderCostRatio << endl; 
    16371637#endif 
    16381638 
     
    24252425                        tStack.push(LineTraversalData(farChild, extp, maxt)); //TODO 
    24262426 
     2427                        // new exit point for near child 
    24272428                        extp = origin + dir * tdist; 
    24282429                        maxt = tdist; 
     
    24532454                                break; 
    24542455 
     2456                        // set new entry point for far child 
    24552457                        entp = extp; 
    24562458                        mint = maxt; 
     
    24692471 
    24702472 
     2473int VspTree::TraverseRayPacket(RayPacket &rp, const bool useMailboxing) 
     2474{ 
    24712475#ifdef USE_SSE 
    2472 int VspTree::TraverseRayPacket(RayPacket &rp, 
    2473                                                            const bool useMailboxing) 
    2474 { 
    24752476        int hits = 0; 
    24762477 
     
    24792480        float zero = 0.0f; 
    24802481 
    2481         __m128 one4 = _mm_load_ps(&one); 
    2482         __m128 zero4 = _mm_load_ps(&zero); 
    2483  
    2484         __m128 *entp4; 
    2485         __m128 *extp4; 
    2486  
    2487         union { float mask[4]; __m128 mask4; }; 
     2482        __m128 one4 = _mm_load1_ps(&one); 
     2483        __m128 zero4 = _mm_load1_ps(&zero); 
     2484 
     2485        union { __m128 mask4; float mask[4];}; 
     2486        union { __m128 mask4_2; float mask_2[4];}; 
     2487 
    24882488        mask4 = one4; 
    24892489 
    2490         __m128 entpX4 = rp.mOriginX4; 
    2491         __m128 entpY4 = rp.mOriginY4; 
    2492         __m128 entpZ4 = rp.mOriginZ4; 
    2493          
    2494         __m128 extpX4 = rp.mTerminationX4; 
    2495         __m128 extpY4 = rp.mTerminationY4; 
    2496         __m128 extpZ4 = rp.mTerminationZ4; 
     2490        __declspec(align(16)) __m128 entp4[] = {rp.mOriginX4, rp.mOriginY4, rp.mOriginZ4}; 
     2491        __declspec(align(16)) __m128 extp4[] = {rp.mTerminationX4, rp.mTerminationY4, rp.mTerminationZ4}; 
    24972492 
    24982493        __m128 *origin = &rp.mOriginX4; 
     
    25112506        __m128 minT4 = zero4; 
    25122507 
    2513         stack<PacketTraversalData *> tStack; 
    2514  
     2508        PacketTraversalStack tStack(1000); 
    25152509 
    25162510        VspNode *node = mRoot; 
     
    25272521                { 
    25282522                        VspInterior *in = static_cast<VspInterior *>(node); 
    2529                          
    2530                         entp4 = &entpX4; 
    2531                         extp4 = &extpX4; 
    2532  
     2523                 
    25332524                        position = in->GetPosition(); 
    25342525                        axis = in->GetAxis(); 
    25352526 
    2536                         position4 = _mm_load_ps(&position); 
     2527                        position4 = _mm_load1_ps(&position); 
    25372528 
    25382529                        // are the entry points all in near leaf? 
     
    25402531                        { 
    25412532                                // are the exit points all in near leaf? 
    2542                                 if (_mm_movemask_ps(_mm_and_ps(_mm_cmpgt_ps(extp4[axis], position4), mask4))) 
     2533                                if (_mm_movemask_ps(_mm_and_ps(_mm_cmple_ps(extp4[axis], position4), mask4))) 
    25432534                                { 
    25442535                                        node = in->GetBack(); 
     
    25552546                        else 
    25562547                        { 
    2557                                 if (_mm_movemask_ps(_mm_and_ps(_mm_cmpgt_ps(position4, extp4[axis]), mask4))) 
     2548                                if (_mm_movemask_ps(_mm_and_ps(_mm_cmple_ps(position4, entp4[axis]), mask4)) && 
     2549                                        _mm_movemask_ps(_mm_and_ps(_mm_cmple_ps(position4, extp4[axis]), mask4))) 
    25582550                                { 
    25592551                                        node = in->GetFront(); 
     
    25732565                        const __m128 tDist4 = _mm_mul_ps(_mm_sub_ps(position4, origin[axis]), termination[axis]); 
    25742566                         
     2567                        mask4 = _mm_and_ps(_mm_cmplt_ps(tDist4, minT4), mask4); 
     2568            mask4_2 = _mm_and_ps(_mm_cmpgt_ps(tDist4, minT4), mask4); 
     2569 
    25752570                        // push far child for further processing 
    2576                         tStack.push(new PacketTraversalData(farChild, extpX4, extpY4, extpZ4, maxT4, mask4)); 
     2571                        tStack.Push(PacketTraversalData(farChild, extp4[0], extp4[1], extp4[2], maxT4, mask4_2)); 
    25772572 
    25782573                        // compute new exit point 
    2579                         extpX4 = _mm_add_ps(_mm_mul_ps(dirX4, tDist4), rp.mOriginX4); 
    2580                         extpY4 = _mm_add_ps(_mm_mul_ps(dirY4, tDist4), rp.mOriginY4); 
    2581                         extpZ4 = _mm_add_ps(_mm_mul_ps(dirZ4, tDist4), rp.mOriginZ4); 
     2574                        extp4[0] = _mm_add_ps(_mm_mul_ps(dirX4, tDist4), rp.mOriginX4); 
     2575                        extp4[1] = _mm_add_ps(_mm_mul_ps(dirY4, tDist4), rp.mOriginY4); 
     2576                        extp4[2] = _mm_add_ps(_mm_mul_ps(dirZ4, tDist4), rp.mOriginZ4); 
    25822577 
    25832578                        maxT4 = tDist4; 
    2584  
    2585                         mask4 = _mm_cmplt_ps( maxT4, minT4); 
    25862579                } 
    25872580                else 
     
    26022595                                for (int i = 0; i < 4; ++i) 
    26032596                                { 
     2597                                        // push view cells for all valid rays 
    26042598                                        if (mask[i])  
    26052599                                                rp.mViewCells[i].push_back(viewCell); 
     
    26102604 
    26112605                        // get the next node from the stack 
    2612                         if (tStack.empty()) 
     2606                        if (tStack.Empty()) 
    26132607                                break; 
    2614  
    2615                         entpX4 = extpX4; 
    2616                         entpY4 = extpY4; 
    2617                         entpZ4 = extpZ4; 
     2608                         
     2609                        // use memcopy? 
     2610                        entp4[0] = extp4[0]; 
     2611                        entp4[1] = extp4[1]; 
     2612                        entp4[2] = extp4[2]; 
    26182613 
    26192614                        minT4 = maxT4; 
     2615 
     2616                        const PacketTraversalData &s = tStack.Top(); 
     2617                        node = s.mNode; 
    26202618                         
    2621                         PacketTraversalData *s  = tStack.top(); 
    2622                         node = s->mNode; 
     2619                        extp4[0] = s.mExitPointX4; 
     2620                        extp4[1] = s.mExitPointY4; 
     2621                        extp4[2] = s.mExitPointZ4; 
     2622 
     2623                        maxT4 = s.mMaxT4; 
     2624                        mask4 = s.mMask4; 
    26232625                         
    2624                         extpX4 = s->mExitPointX4; 
    2625                         extpY4 = s->mExitPointY4; 
    2626                         extpZ4 = s->mExitPointZ4; 
    2627  
    2628                         maxT4 = s->mMaxT4; 
    2629  
    2630                         mask4 = s->mMask4; 
    2631  
    2632                         tStack.pop(); 
    2633                         delete s; 
    2634                 } 
    2635         } 
    2636  
     2626                        tStack.Pop(); 
     2627                } 
     2628        } 
     2629         
    26372630        return hits; 
    26382631 
    2639 /* 
    2640         const int offs[4] = {(rp.dx[0] >= 0) ? 1 : 0,  (rp.dy[0] >= 0)? 1 : 0,  (rp.dz[0] >= 0)? 1 : 0, 0}; 
    2641  
    2642         while (!node->IsLeaf()) 
    2643         { 
    2644                 PacketTraversalData *tData = tStack.top(); 
    2645                 tStack.pop(); 
    2646  
    2647                 node = tData->node; 
    2648                 VspInterior *interior = static_cast<VspInterior *>(node); 
    2649                 tn4 = tData->tn4; 
    2650                 tf4 = tData->tf4; 
    2651                 mask = tData->mask4; 
    2652  
    2653                 position = interior->GetPosition(); 
    2654                 const __m128 position4 = _mm_load_ps(&pos); 
    2655  
    2656                 const int axis = interior->GetAxis(); 
    2657                 const __m128 d4 = _mm_mul_ps(_mm_sub_ps(splitPos, origin[axis]), termination[axis]); 
    2658  
    2659                 VspNode* ln = offs[axis] ? interior->GetFront() : interior->GetBack(); 
    2660  
    2661                 if (!_mm_movemask_ps(_mm_and_ps(_mm_cmpgt_ps(d4, tn4), mask))) 
    2662                 {  
    2663                         node = ln;  
    2664                         continue;  
    2665                 } 
    2666  
    2667                 node = offs[axis]^1 ? interior->GetFront() : interior->GetBack();// + (offs[aidx]^1); 
    2668  
    2669                 if (_mm_movemask_ps( _mm_and_ps( _mm_cmplt_ps(d4, tf4), mask))) 
    2670                 { 
    2671                         const __m128 mask2 = _mm_cmpgt_ps(d4, tn4); 
    2672                         const __m128 mask3 = _mm_cmplt_ps(d4, tf4); 
    2673  
    2674  
    2675                         tData->tf4 = tf4 = _mm_or_ps(_mm_and_ps(mask3, d4), _mm_andnot_ps( mask3, tf4)); 
    2676                         tData->node = (VspNode *)ln; 
    2677                         tData->mask4 = mask; 
    2678                         tData->tn4 = _mm_or_ps( _mm_and_ps( mask2, d4 ), _mm_andnot_ps( mask2, tn4 ) ); 
    2679                         mask = _mm_cmplt_ps( tn4, tf4 ); 
    2680                 } 
    2681         }*/ 
    2682 } 
     2632#else 
     2633 
     2634        return 0; 
    26832635#endif 
     2636} 
    26842637 
    26852638 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h

    r2347 r2353  
    11281128        int CompressObjects(VspLeaf *leaf); 
    11291129 
     1130        int TraverseRayPacket(RayPacket &rp, const bool useMailboxing); 
    11301131 
    11311132#ifdef USE_SSE 
    11321133        struct PacketTraversalData 
    11331134        { 
     1135                PacketTraversalData () {} 
     1136         
     1137                PacketTraversalData (VspNode *n,  
     1138                                         const __m128 &px, const __m128 &py, const __m128 &pz,  
     1139                                                         const __m128 &maxt, 
     1140                                                         const __m128 &mask): 
     1141                mNode(n),  
     1142                mExitPointX4(px), mExitPointY4(py), mExitPointZ4(pz), 
     1143                mMaxT4(maxt), 
     1144                mMask4(mask) 
     1145                {} 
     1146 
    11341147                VspNode *mNode; 
    11351148 
    1136                 union { float mExitPointX[4]; __m128 mExitPointX4; }; 
    1137                 union { float mExitPointY[4]; __m128 mExitPointY4; }; 
    1138                 union { float mExitPointZ[4]; __m128 mExitPointZ4; }; 
    1139  
    1140                 union { float mMaxT[4]; __m128 mMaxT4; }; 
    1141                 union { float mMask[4]; __m128 mMask4; }; 
    1142  
    1143                 PacketTraversalData () {} 
    1144                 PacketTraversalData (VspNode *n,  
    1145                         const __m128 &px, const __m128 &py, const __m128 &pz,  
    1146                         const __m128 &maxt, 
    1147                         const __m128 &mask): 
    1148                 mNode(n),  
    1149                         mExitPointX4(px), mExitPointY4(py), mExitPointZ4(pz), 
    1150                         mMaxT4(maxt), 
    1151                         mMask4(mask) 
    1152                 {} 
     1149                union { __m128 mExitPointX4; float mExitPointX[4]; }; 
     1150                union { __m128 mExitPointY4; float mExitPointY[4]; }; 
     1151                union { __m128 mExitPointZ4; float mExitPointZ[4]; }; 
     1152 
     1153                union { __m128 mMaxT4; float mMaxT[4]; }; 
     1154                union { __m128 mMask4; float mMask[4]; }; 
    11531155        }; 
    11541156 
    11551157 
    1156         int TraverseRayPacket(RayPacket &rp, const bool useMailboxing); 
     1158        struct __declspec(align(16)) PacketTraversalStack 
     1159        { 
     1160                // for performance 
     1161                friend class VspTree; 
     1162 
     1163        public: 
     1164                PacketTraversalStack(const int depth): 
     1165                mStackPtr(0),  
     1166                //mDepth(depth) 
     1167                mDepth(1000) 
     1168                { 
     1169                        //mData = new PacketTraversalData[mDepth]; 
     1170                } 
     1171 
     1172                ~PacketTraversalStack() 
     1173                { 
     1174                        //delete [] mData; 
     1175                } 
     1176                 
     1177                //PacketTraversalStack() {} 
     1178 
     1179                void Pop() {-- mStackPtr;} 
     1180                const PacketTraversalData &Top() const { return mData[mStackPtr - 1];} 
     1181                 
     1182                void Push(const PacketTraversalData &tData)  
     1183                { 
     1184                        // note: faster with direct assignments 
     1185                        mData[mStackPtr ++] = tData; 
     1186                        //if (mStackPtr == mDepth) std::cerr << "this can never happen!!" << std::endl; 
     1187                } 
     1188 
     1189                bool Empty() const {return mStackPtr <= 0;} 
     1190 
     1191        protected: 
     1192 
     1193                // static array to avoid using operator new 
     1194                //PacketTraversalData *mData; 
     1195                PacketTraversalData mData[1000]; 
     1196 
     1197                int mStackPtr; 
     1198                int mDepth; 
     1199 
     1200        }; 
    11571201 
    11581202#endif 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.h

    r2342 r2353  
    2222#define VSS_STORE_VIEWCELLS 1 
    2323 
    24 #ifdef USE_SSE 
    25  
    26 struct RayPacket 
    27 { 
    28         union { float mOriginX[4]; __m128 mOriginX4; }; 
    29         union { float mOriginY[4]; __m128 mOriginY4; }; 
    30         union { float mOriginZ[4]; __m128 mOriginZ4; }; 
    31  
    32         union { float mTerminationX[4]; __m128 mTerminationX4; }; 
    33         union { float mTerminationY[4]; __m128 mTerminationY4; }; 
    34         union { float mTerminationZ[4]; __m128 mTerminationZ4; }; 
    35  
    36         ViewCellContainer mViewCells[4]; 
    37 }; 
    38  
    39  
    40 #endif 
    4124 
    4225 
     
    345328  void PrintStatistics(std::ostream &s); 
    346329  int SelectRays(const int number, VssRayContainer &selected, const bool copy=false) const; 
    347   int 
    348   GetContributingRays(VssRayContainer &selected, 
    349                                           const int minPass 
    350                                           ) const; 
    351    
    352 }; 
    353  
    354 /* 
    355 struct VssRayDistribution { 
    356   VssRayDistribution() { mContribution = -1.0f; } 
    357   SimpleRayContainer mRays; 
    358   vector<VssRayContainer> mVssRays; 
    359   float mContribution; 
    360   float mTime; 
    361 }; 
    362  
    363 struct VssRayDistributionMixture { 
    364   VssRayDistributionMixture() {} 
    365    
    366   vector<VssRayDistribution> distributions; 
    367 }; 
    368 */ 
    369  
    370 }; 
    371  
    372 #endif 
     330  int GetContributingRays(VssRayContainer &selected, const int minPass) const; 
     331   
     332}; 
     333 
     334 
     335struct RayPacket 
     336{ 
     337        RayPacket(const VssRayContainer &rays) 
     338        { 
     339                for (int i = 0; i < 4; ++ i) 
     340                        mOriginX[i] = rays[i]->mOrigin[0]; 
     341 
     342                for (int i = 0; i < 4; ++ i) 
     343                        mOriginY[i] = rays[i]->mOrigin[1]; 
     344 
     345                for (int i = 0; i < 4; ++ i) 
     346                        mOriginZ[i] = rays[i]->mOrigin[2]; 
     347        } 
     348#ifdef USE_SSE   
     349        union { float mOriginX[4]; __m128 mOriginX4; }; 
     350        union { float mOriginY[4]; __m128 mOriginY4; }; 
     351        union { float mOriginZ[4]; __m128 mOriginZ4; }; 
     352 
     353        union { float mTerminationX[4]; __m128 mTerminationX4; }; 
     354        union { float mTerminationY[4]; __m128 mTerminationY4; }; 
     355        union { float mTerminationZ[4]; __m128 mTerminationZ4; }; 
     356#else 
     357        float mOriginX[4]; 
     358        float mOriginY[4]; 
     359        float mOriginZ[4]; 
     360 
     361        float mTerminationX[4]; 
     362        float mTerminationY[4]; 
     363        float mTerminationZ[4]; 
     364#endif 
     365        ViewCellContainer mViewCells[4]; 
     366}; 
     367 
     368 
     369}; 
     370 
     371#endif 
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r2176 r2353  
    184184        } 
    185185#endif 
    186          
     186 
    187187        Environment::GetSingleton()->Parse(argc, argv, USE_EXE_PATH); 
    188188        MeshKdTree::ParseEnvironment(); 
Note: See TracChangeset for help on using the changeset viewer.