Changeset 519 for trunk/VUT


Ignore:
Timestamp:
01/11/06 23:37:19 (19 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT/GtpVisibilityPreprocessor/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp

    r518 r519  
    321321 
    322322 
     323AxisAlignedBox3 ViewCellsManager::GetViewSpaceBox() const 
     324{ 
     325        return mSceneBox; 
     326} 
     327 
     328 
    323329void ViewCellsManager::ResetViewCells() 
    324330{ 
     
    344350  Ray hray(ray); 
    345351  float tmin = 0, tmax = 1.0; 
    346 Debug << "here3" << endl; 
     352 
    347353  //hray.Init(ray.GetOrigin(), ray.GetDir(), Ray::LINE_SEGMENT); 
    348   if (!GetSceneBbox().GetRaySegment(hray, tmin, tmax) || (tmin > tmax)) 
     354  if (!GetViewSpaceBox().GetRaySegment(hray, tmin, tmax) || (tmin > tmax)) 
    349355        return; 
    350356 
     
    594600        // compute view cell area as subsititute for probability 
    595601#if 0 
    596         return GetArea(viewCell) / GetSceneBbox().SurfaceArea(); 
     602        return GetArea(viewCell) / GetViewSpaceBox().SurfaceArea(); 
    597603#else 
    598604        return GetArea(viewCell) / GetAccVcArea(); 
     
    604610{ 
    605611        return viewCell->GetPvs().GetSize() * objRendercost; 
    606 } 
    607  
    608  
    609 AxisAlignedBox3 BspViewCellsManager::GetSceneBbox() const 
    610 { 
    611         return mBspTree->GetBoundingBox(); 
    612612} 
    613613 
     
    11101110        // compute view cell area / volume as subsititute for probability 
    11111111#if 0 
    1112         return GetArea(viewCell) / GetSceneBbox().SurfaceArea(); 
     1112        return GetArea(viewCell) / GetViewSpaceBox().SurfaceArea(); 
    11131113#endif 
    11141114#if 1 
     
    11161116#endif 
    11171117#if 0 
    1118         return GetVolume(viewCell) / GetSceneBbox().GetVolume(); 
     1118        return GetVolume(viewCell) / GetViewSpaceBox().GetVolume(); 
    11191119#endif 
    11201120} 
     
    11271127 
    11281128 
    1129 AxisAlignedBox3 KdViewCellsManager::GetSceneBbox() const 
    1130 { 
    1131         return mKdTree->GetBox(); 
    1132 } 
    1133  
    11341129void KdViewCellsManager::CollectViewCells() 
    11351130{ 
    11361131        //mKdTree->CollectViewCells(mViewCells); TODO 
    11371132} 
     1133 
    11381134 
    11391135int KdViewCellsManager::Construct(const ObjectContainer &objects, 
     
    14081404        // volume or area substitutes for view point probability 
    14091405#if 0 
    1410         return GetArea(viewCell) / GetSceneBbox().SurfaceArea(); 
     1406        return GetArea(viewCell) / GetViewSpaceBox().SurfaceArea(); 
    14111407#else 
    14121408        return GetArea(viewCell) / GetAccVcArea(); 
     
    14951491 
    14961492        return 0; 
    1497 } 
    1498  
    1499  
    1500 AxisAlignedBox3 VspKdViewCellsManager::GetSceneBbox() const 
    1501 { 
    1502         return mVspKdTree->GetBBox(mVspKdTree->GetRoot()); 
    15031493} 
    15041494 
     
    17671757{ 
    17681758#if 0 
    1769         return GetArea(viewCell) / GetSceneBbox().SurfaceArea(); 
     1759        return GetArea(viewCell) / GetViewSpaceBox().SurfaceArea(); 
    17701760#else 
    17711761        return GetArea(viewCell) / GetAccVcArea(); 
     
    17841774{ 
    17851775        return viewCell->GetPvs().GetSize() * objRendercost; 
    1786 } 
    1787  
    1788  
    1789 AxisAlignedBox3 VspBspViewCellsManager::GetSceneBbox() const 
    1790 { 
    1791         return mVspBspTree->GetBoundingBox(); 
    17921776} 
    17931777 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.h

    r517 r519  
    214214        virtual float GetVolume(ViewCell *viewCell) const; 
    215215 
    216         virtual AxisAlignedBox3 GetSceneBbox() const = 0; 
    217  
    218216        /** Sets the current renderer mainly for view cells statistics. 
    219217        */ 
     
    232230        */ 
    233231        void SetViewSpaceBox(const AxisAlignedBox3 &box); 
     232 
     233        AxisAlignedBox3 GetViewSpaceBox() const; 
    234234 
    235235        /** Creates mesh for this view cell. 
     
    365365        float GetRendercost(ViewCell *viewCell, float objRendercost) const; 
    366366 
    367         AxisAlignedBox3 GetSceneBbox() const; 
    368  
    369367        /** Get a viewcell containing the specified point */ 
    370368        ViewCell *GetViewCell(const Vector3 &point); 
     
    442440        float GetProbability(ViewCell *viewCell); 
    443441        float GetRendercost(ViewCell *viewCell, float objRendercost) const; 
    444    
    445         AxisAlignedBox3 GetSceneBbox() const; 
    446442 
    447443        void CreateMesh(ViewCell *vc); 
     
    501497        float GetRendercost(ViewCell *viewCell, float objRendercost) const; 
    502498 
    503         AxisAlignedBox3 GetSceneBbox() const; 
    504  
    505499        void CreateMesh(ViewCell *vc); 
    506500 
     
    556550        float GetRendercost(ViewCell *viewCell, float objRendercost) const; 
    557551         
    558         AxisAlignedBox3 GetSceneBbox() const; 
    559          
    560552        ViewCell *GetViewCell(const Vector3 &point); 
    561553 
Note: See TracChangeset for help on using the changeset viewer.