Ignore:
Timestamp:
12/16/05 18:52:33 (19 years ago)
Author:
mattausch
Message:

updated view cells, view cell manager. changed rendersimulator

File:
1 edited

Legend:

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

    r468 r469  
    172172  /** Returns probability that view point lies in one view cell. 
    173173  */ 
    174   virtual float GetProbability(ViewCell *viewCell) = 0; 
     174  virtual float GetProbability(ViewCell *viewCell) const = 0; 
    175175 
    176176  /** Returns render cost of a single view cell given the render cost of an object. 
    177177  */ 
    178   virtual float GetRendercost(ViewCell *viewCell, float objRendercost) = 0; 
     178  virtual float GetRendercost(ViewCell *viewCell, float objRendercost) const = 0; 
    179179 
    180180  /** Returns vector of loaded / generated view cells. 
     
    182182  ViewCellContainer &GetViewCells(); 
    183183 
     184  /** Helper function used to split ray set into one used for view cell 
     185      construction and one cast after construction. 
     186  */ 
     187  void GetRaySets(const VssRayContainer &sourceRays, 
     188                                  VssRayContainer &constructionRays,  
     189                                  VssRayContainer &savedRays) const; 
     190 
    184191protected: 
    185          
    186  
    187         /** Initialises the render time simulator. 
    188         */ 
    189         void InitRenderSimulator(); 
    190         ///////////////////// 
    191  
    192          
     192                 
    193193        /// the view cell corresponding to unbounded space 
    194194        ViewCell *mUnbounded; 
     
    198198 
    199199        /// Loaded view cells 
    200   ViewCellContainer mViewCells; 
     200        ViewCellContainer mViewCells; 
    201201 
    202202        /// maximum number of samples taken for construction of the view cells 
     
    242242        void PrintStatistics(ostream &s) const; 
    243243 
    244         ~BspViewCellsManager(); 
    245  
    246244        int CastLineSegment(const Vector3 &origin, 
    247245                                                const Vector3 &termination, 
    248246                                                ViewCellContainer &viewcells); 
    249247         
    250         float GetProbability(ViewCell *viewCell); 
    251         float GetRendercost(ViewCell *viewCell, float objRendercost); 
     248        float GetProbability(ViewCell *viewCell) const; 
     249        float GetRendercost(ViewCell *viewCell, float objRendercost) const; 
    252250 
    253251protected: 
     
    312310        virtual void PrintStatistics(ostream &s) const; 
    313311 
    314         float GetProbability(ViewCell *viewCell); 
    315         float GetRendercost(ViewCell *viewCell, float objRendercost); 
     312        float GetProbability(ViewCell *viewCell) const; 
     313        float GetRendercost(ViewCell *viewCell, float objRendercost) const; 
    316314 
    317315protected: 
     
    338336        VspKdViewCellsManager(VspKdTree *vspKdTree, int constructionSamples); 
    339337 
    340         ~VspKdViewCellsManager(); 
    341  
    342338        int Construct(const ObjectContainer &objects,  
    343339                                  const VssRayContainer &rays, 
     
    364360                                                ViewCellContainer &viewcells); 
    365361 
    366         float GetProbability(ViewCell *viewCell); 
    367         float GetRendercost(ViewCell *viewCell, float objRendercost); 
     362        float GetProbability(ViewCell *viewCell) const; 
     363        float GetRendercost(ViewCell *viewCell, float objRendercost) const; 
    368364 
    369365protected: 
     
    385381        VspBspViewCellsManager(VspBspTree *tree, int constructionSamples); 
    386382 
    387         ~VspBspViewCellsManager(); 
    388  
    389383        int Construct(const ObjectContainer &objects,  
    390384                                  const VssRayContainer &rays, 
     
    410404                                                ViewCellContainer &viewcells); 
    411405 
    412         float GetProbability(ViewCell *viewCell); 
    413         float GetRendercost(ViewCell *viewCell, float objRendercost); 
     406        float GetProbability(ViewCell *viewCell) const; 
     407        float GetRendercost(ViewCell *viewCell, float objRendercost) const; 
    414408 
    415409 
Note: See TracChangeset for help on using the changeset viewer.