Changeset 2288


Ignore:
Timestamp:
03/23/07 18:25:00 (17 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis
Files:
5 edited

Legend:

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

    r2287 r2288  
    144144        { 
    145145                mThreshold = RAND_MAX - RAND_MAX / mAssumedVisibility; 
    146                 if (mAssumedVisibility > 100) // fix visibility 
     146                 // fix visibility 
     147                if (mAssumedVisibility > 100) 
    147148                        mThreshold = RAND_MAX; 
    148149        } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj

    r2255 r2288  
    224224                                OptimizeForWindowsApplication="TRUE" 
    225225                                AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl";"$(CG_INC_PATH)";Timer;..\src\sparsehash\src\google\sparsehash;..\src\sparsehash\src\windows;..\src\sparsehash\src\google;..\src\sparsehash\src;..\src\ootl\;..\src\ootl\src\;..\src\ootl\src\cpp;..\src\ootl\src\cpp\include\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;..\src\ootl\src\cpp\include\ootl\mswin" 
    226                                 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PV" 
     226                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PV;USE_SSE" 
    227227                                StringPooling="TRUE" 
    228228                                MinimalRebuild="TRUE" 
     
    11741174                        </File> 
    11751175                        <File 
     1176                                RelativePath=".\sparsehash\src\windows\hash_fun.h"> 
     1177                        </File> 
     1178                        <File 
    11761179                                RelativePath=".\sparsehash\src\google\sparsehash\hash_fun.h"> 
    1177                         </File> 
    1178                         <File 
    1179                                 RelativePath=".\sparsehash\src\windows\hash_fun.h"> 
    11801180                        </File> 
    11811181                        <File 
  • GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj

    r2255 r2288  
    201201                                OptimizeForWindowsApplication="TRUE" 
    202202                                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;;QtInterface;..\src\sparsehash\src\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;$(NOINHERIT)" 
    203                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_HASH_PV" 
     203                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_HASH_PV;USE_SSE" 
    204204                                StringPooling="TRUE" 
    205205                                MinimalRebuild="TRUE" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r2239 r2288  
    2222#include "OspTree.h" 
    2323 
    24 #if USE_SSE 
    25 #include <xmmintrin.h> 
    26 #endif 
    2724 
    2825 
     
    39303927} 
    39313928#endif 
    3932 /* 
    3933 struct RayPacket 
    3934 { 
    3935         union { float ox[4]; __m128 ox4; }; 
    3936         union { float oy[4]; __m128 oy4; }; 
    3937         union { float oz[4]; __m128 oz4; }; 
    3938         union { float dx[4]; __m128 dx4; }; 
    3939         union { float dy[4]; __m128 dy4; }; 
    3940         union { float dz[4]; __m128 dz4; }; 
    3941 }; 
    3942 */ 
     3929 
     3930 
     3931 
    39433932void VspTree::TraverseRayPacket()//RayBundle &rays) 
    39443933{ 
    3945 #if USE_SSE 
     3934#ifdef USE_SSE 
    39463935        VspNode *node; 
    39473936 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h

    r2237 r2288  
    1313#include "HierarchyManager.h" 
    1414#include "Timer/PerfTimer.h" 
     15 
     16#ifdef USE_SSE 
     17#include <xmmintrin.h> 
     18#endif 
     19 
    1520 
    1621 
     
    954959        void EvalMinMaxDepth(int &minDepth, int &maxDepth); 
    955960 
    956         ///////////////////////////////////////////////////////////////////////////// 
     961 
     962 
     963        ///////////////////////////////////////////////////////////// 
    957964 
    958965 
     
    972979                                  RayInfoContainer &backRays) const; 
    973980 
    974         inline void UpdatePvsEntriesContribution( 
    975                 const VssRay &ray, 
    976                 const bool isTermination, 
    977                 const int cf, 
    978                 float &frontPvs, 
    979                 float &backPvs, 
    980                 float &totalPvs) const; 
     981 
     982        inline void UpdatePvsEntriesContribution(const VssRay &ray, 
     983                                                                                         const bool isTermination, 
     984                                                                                         const int cf, 
     985                                                                                         float &frontPvs, 
     986                                                                                         float &backPvs, 
     987                                                                                         float &totalPvs) const; 
    981988 
    982989        /** Classfifies the object with respect to the  
     
    990997         
    991998        */ 
    992         inline void UpdateContributionsToPvs( 
    993                 const VssRay &ray, 
    994                 const bool isTermination, 
    995                 const int cf, 
    996                 float &frontPvs, 
    997                 float &backPvs, 
    998                 float &totalPvs) const; 
     999        inline void UpdateContributionsToPvs(const VssRay &ray, 
     1000                                                                                 const bool isTermination, 
     1001                                                                                 const int cf, 
     1002                                                                                 float &frontPvs, 
     1003                                                                                 float &backPvs, 
     1004                                                                                 float &totalPvs) const; 
    9991005 
    10001006        /** Evaluates the contribution for objects. 
    10011007        */ 
    1002         inline void UpdateContributionsToPvs( 
    1003                 Intersectable *obj,  
    1004                 const int cf,  
    1005                 float &frontPvs,  
    1006                 float &backPvs,  
    1007                 float &totalPvs) const; 
     1008        inline void UpdateContributionsToPvs(Intersectable *obj,  
     1009                                                                                 const int cf,  
     1010                                                                                 float &frontPvs,  
     1011                                                                                 float &backPvs,  
     1012                                                                                 float &totalPvs) const; 
    10081013 
    10091014        /** Evaluates the contribution for bounding volume leaves. 
    10101015        */ 
    1011         inline void UpdateContributionsToPvs( 
    1012                 BvhLeaf *leaf, 
    1013                 const int cf, 
    1014                 float &frontPvs, 
    1015                 float &backPvs, 
    1016                 float &totalPvs, 
    1017                 const bool countEntries) const; 
    1018  
    10191016        inline void UpdateContributionsToPvs(BvhLeaf *leaf, 
    10201017                                                                                 const int cf, 
    1021                                                                                  float &frontPvs, float &backPvs, float &totalPvs, 
    1022                                                                                  int &frontSize, int &backSize, int &totalSize) const; 
     1018                                                                                 float &frontPvs, 
     1019                                                                                 float &backPvs, 
     1020                                                                                 float &totalPvs, 
     1021                                                                                 const bool countEntries) const; 
     1022 
     1023        inline void UpdateContributionsToPvs(BvhLeaf *leaf, 
     1024                                                                                 const int cf, 
     1025                                                                                 float &frontPvs,  
     1026                                                                                 float &backPvs,  
     1027                                                                                 float &totalPvs, 
     1028                                                                                 int &frontSize,  
     1029                                                                                 int &backSize,  
     1030                                                                                 int &totalSize) const; 
    10231031 
    10241032        /** Evaluates the contribution for kd leaves. 
    10251033        */ 
    1026         inline void UpdateContributionsToPvs( 
    1027                 KdLeaf *leaf, 
    1028                 const int cf, 
    1029                 float &frontPvs, 
    1030                 float &backPvs, 
    1031                 float &totalPvs) const; 
     1034        inline void UpdateContributionsToPvs(KdLeaf *leaf, 
     1035                                                                                 const int cf, 
     1036                                                                                 float &frontPvs, 
     1037                                                                                 float &backPvs, 
     1038                                                                                 float &totalPvs) const; 
    10321039 
    10331040        /** Returns true if tree can be terminated. 
     
    11141121        void TraverseRayPacket(); 
    11151122 
     1123#ifdef USE_SSE 
     1124 
     1125        struct RayPacket 
     1126        { 
     1127                union { float ox[4]; __m128 ox4; }; 
     1128                union { float oy[4]; __m128 oy4; }; 
     1129                union { float oz[4]; __m128 oz4; }; 
     1130                union { float dx[4]; __m128 dx4; }; 
     1131                union { float dy[4]; __m128 dy4; }; 
     1132                union { float dz[4]; __m128 dz4; }; 
     1133        }; 
     1134#endif 
     1135 
    11161136protected: 
    11171137 
     
    11411161 
    11421162 
     1163        ///////// 
    11431164        //-- local termination 
    11441165 
     
    11581179        int mTermMissTolerance; 
    11591180 
    1160  
     1181        //////////// 
    11611182        //-- global criteria 
     1183 
    11621184        float mTermMinGlobalCostRatio; 
    11631185        int mTermGlobalCostMissTolerance; 
Note: See TracChangeset for help on using the changeset viewer.