Changeset 722


Ignore:
Timestamp:
03/31/06 20:31:55 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj

    r675 r722  
    266266                        </Filter> 
    267267                </Filter> 
     268                <File 
     269                        RelativePath=".\VTune\Plugin_VisibilitySceneManager.vpj"> 
     270                </File> 
    268271        </Files> 
    269272        <Globals> 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp

    r370 r722  
    5151bool OctreeHierarchyInterface::HasGeometry(GtpVisibility::HierarchyNode *node) const 
    5252{ 
    53         return static_cast<Octree *>(node)->mNodes.size() > 0; 
     53        return !(static_cast<Octree *>(node))->mNodes.empty(); 
    5454} 
    5555//----------------------------------------------------------------------- 
    5656float OctreeHierarchyInterface::GetSquaredDistance(GtpVisibility::HierarchyNode *node) const 
    5757{ 
    58         AxisAlignedBox *box = &static_cast<Octree *>(node)->mBox; 
    59         Vector3 pos = ((box->getMaximum() - box->getMinimum()) * 0.5) + box->getMinimum(); 
     58        LogManager::getSingleton().logMessage("here4"); 
     59 
     60        const AxisAlignedBox &box = static_cast<Octree *>(node)->mBox; 
     61        const Vector3 pos = ((box.getMaximum() - box.getMinimum()) * 0.5) + box.getMinimum(); 
    6062         
    6163        return (mCullCamera->getDerivedPosition() - pos).squaredLength(); 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidBoundingBox.cpp

    r118 r722  
    99#include <OgrePass.h> 
    1010#include <OgreTechnique.h> 
     11#include <OgreLogManager.h> 
    1112 
    1213namespace Ogre { 
     
    157158Real SolidBoundingBox::getSquaredViewDepth(const Camera* cam) const 
    158159{ 
    159         Vector3 min, max, mid, dist; 
    160  
    161         min = mBox.getMinimum(); 
    162         max = mBox.getMaximum(); 
    163         mid = ((min - max) * 0.5) + min; 
    164         dist = cam->getDerivedPosition() - mid; 
     160        Ogre::LogManager::getSingleton().logMessage("here3"); 
     161        const Vector3 &min = mBox.getMinimum(); 
     162        const Vector3 &max = mBox.getMaximum(); 
     163        const Vector3 &mid = ((min - max) * 0.5) + min; 
     164        const Vector3 &dist = cam->getDerivedPosition() - mid; 
    165165 
    166166        return dist.squaredLength(); 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DistanceQueue.h

    r316 r722  
    2525        bool operator() (T v1, T v2) const 
    2626        { 
    27                 return mHierarchyInterface->GetSquaredDistance(v1) > mHierarchyInterface->GetSquaredDistance(v2); 
     27                return false;//mHierarchyInterface->GetSquaredDistance(v1) > mHierarchyInterface->GetSquaredDistance(v2); 
    2828        } 
    2929                 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp

    r720 r722  
    1111//----------------------------------------------------------------------- 
    1212VisibilityManager::VisibilityManager(VisibilityEnvironment *visEnvironment): 
    13 mVisibilityThreshold(0), mCullingManager(NULL), 
     13mVisibilityThreshold(0),  
     14mCullingManager(NULL), 
    1415mQueryManager(NULL), 
    1516mPreprocessingManager(new DummyPreprocessingManager(NULL)), 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj

    r712 r722  
    495495                        </File> 
    496496                </Filter> 
     497                <File 
     498                        RelativePath=".\VTune\Preprocessor.vpj"> 
     499                </File> 
    497500        </Files> 
    498501        <Globals> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r712 r722  
    12791279                                        "8000000"); 
    12801280 
     1281        RegisterOption("ViewCells.Evaluation.samplingType", 
     1282                        optString, 
     1283                        "view_cells_evaluation_sampling_type=", 
     1284                        "box"); 
     1285 
    12811286        RegisterOption("ViewCells.Evaluation.samplesPerPass", 
    12821287                                        optInt, 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r720 r722  
    9797         
    9898        if (strcmp(buf, "box") == 0) 
     99        { 
    99100                mSamplingType = Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION; 
     101        } 
    100102        else if (strcmp(buf, "directional") == 0) 
     103        { 
    101104                mSamplingType = Preprocessor::DIRECTION_BASED_DISTRIBUTION; 
     105        } 
    102106        else  
    103107        { 
     
    106110        } 
    107111 
    108         environment->GetStringValue("ViewCells.Visualization.colorCode", buf); 
     112        environment->GetStringValue("ViewCells.Evaluation.samplingType", buf); 
     113         
     114        if (strcmp(buf, "box") == 0) 
     115        { 
     116                mEvaluationSamplingType = Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION; 
     117        } 
     118        else if (strcmp(buf, "directional") == 0) 
     119        { 
     120                mEvaluationSamplingType = Preprocessor::DIRECTION_BASED_DISTRIBUTION; 
     121        } 
     122        else  
     123        { 
     124                Debug << "error! wrong sampling type" << endl; 
     125                exit(0); 
     126        } 
     127 
     128    environment->GetStringValue("ViewCells.Visualization.colorCode", buf); 
    109129 
    110130        if (strcmp(buf, "PVS") == 0) 
     
    492512        //VssRayContainer outRays; 
    493513        // should directional sampling be used? 
    494         bool dirSamples = mSamplingType == Preprocessor::DIRECTION_BASED_DISTRIBUTION; 
     514        bool dirSamples = (mEvaluationSamplingType == Preprocessor::DIRECTION_BASED_DISTRIBUTION); 
    495515 
    496516        cout << "Evaluating view cell partition" << endl; 
     
    521541                VssRayContainer evaluationSamples; 
    522542 
    523                 const int samplingType = mSamplingType; 
     543                const int samplingType = mEvaluationSamplingType; 
    524544                /*      dirSamples ?  
    525545                                                Preprocessor::DIRECTION_BASED_DISTRIBUTION : 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r720 r722  
    549549 
    550550        int mSamplingType; 
     551        int mEvaluationSamplingType; 
    551552        int mNumActiveViewCells; 
    552553        bool mCompressViewCells; 
  • GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.vcproj

    r656 r722  
    146146                </Filter> 
    147147                <File 
     148                        RelativePath=".\VTune\EvalStats.vpj"> 
     149                </File> 
     150                <File 
    148151                        RelativePath=".\ReadMe.txt"> 
    149152                </File> 
Note: See TracChangeset for help on using the changeset viewer.