Ignore:
Timestamp:
01/25/06 01:44:46 (18 years ago)
Author:
mattausch
Message:

finished function for view cell construction
removed bsp rays from vspbspmanager

File:
1 edited

Legend:

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

    r573 r574  
    4747  enum {BSP, KD, VSP_KD, VSP_BSP}; 
    4848   
    49         /** Constructor taking the maximal number of samples used for construction 
    50         */ 
    51         ViewCellsManager(const int constructionSamples); 
     49        /** Constructor taking the initial and construction samples. 
     50                @param initialSamples the maximal number of samples used for creating the hierarchy 
     51                of view cells 
     52                @param constructionSamples the maximal number of samples used for construction 
     53        */ 
     54        ViewCellsManager(const int initialSamples, const int constructionSamples); 
    5255 
    5356        ViewCellsManager(); 
     
    6265        /** Constructs view cell container with a given number of samples. 
    6366        */ 
    64         virtual int Construct(const ObjectContainer &objects,  
     67        virtual int ConstructSubdivision(const ObjectContainer &objects,  
    6568                                                  const VssRayContainer &rays) = 0; 
    6669 
     
    7073                adding the contribution 
    7174                @param addRays true if rays should be added to the PVSs of the viewcells they 
    72                 intersect */ 
     75                intersect  
     76                @param storeViewCells true if view cells should be stored in the ray 
     77        */ 
    7378  float ComputeSampleContributions(const VssRayContainer &rays, 
    74                                                                    const bool addContributions = true); 
     79                                                                   const bool addContributions, 
     80                                                                   const bool storeViewCells); 
    7581 
    7682  /** Add sample contributions to the viewcells they intersect */ 
     
    8591                @returns number of sample contributions 
    8692        */ 
    87         virtual float ComputeSampleContributions(VssRay &ray, const bool addRays = true); 
     93        virtual float ComputeSampleContributions(VssRay &ray, const bool addRays, const bool storeViewCells); 
    8894 
    8995  virtual void AddSampleContributions(VssRay &ray); 
     
    147153        void SetVisualizationSamples(const int visSamples); 
    148154 
     155        /** Sets maximal number of samples used for the construction of the view cells. 
     156        */ 
     157        void SetConstructionSamples(const int constructionSamples); 
     158 
    149159        /** Sets maximal number of samples used for the visualization of the view cells. 
    150160        */ 
    151         void SetConstructionSamples(const int constructionSamples); 
     161        void SetInitialSamples(const int initialSamples); 
    152162 
    153163        /** Sets maximal number of samples used for the post processing of the view cells. 
     
    306316protected: 
    307317 
    308         int CastPassSamples(int samplesPerPass,  
    309                                                 int sampleType,  
    310                                                 VssRayContainer *outRays) const; 
     318        int CastPassSamples(const int samplesPerPass,  
     319                                                const int sampleType,  
     320                                                VssRayContainer &vssRays) const; 
    311321 
    312322        void ParseEnvironment(); 
     
    367377        /// maximum number of samples taken for construction of the view cells 
    368378        int mConstructionSamples; 
     379        int mSamplesPerPass; 
     380        int mInitialSamples; 
    369381        int mPostProcessSamples; 
    370382        int mVisualizationSamples; 
     
    409421                used to construct the bsp tree. 
    410422        */ 
    411         BspViewCellsManager(BspTree *tree, int constructionSamples); 
     423        BspViewCellsManager(BspTree *tree); 
    412424 
    413425        ~BspViewCellsManager(); 
    414426 
    415         int Construct(const ObjectContainer &objects,  
     427        int ConstructSubdivision(const ObjectContainer &objects,  
    416428                                  const VssRayContainer &rays); 
    417429 
     
    482494        KdViewCellsManager(KdTree *tree); 
    483495 
    484         int Construct(const ObjectContainer &objects,  
     496        int ConstructSubdivision(const ObjectContainer &objects,  
    485497                                  const VssRayContainer &rays); 
    486498 
     
    536548public: 
    537549 
    538         VspKdViewCellsManager(VspKdTree *vspKdTree, int constructionSamples); 
    539  
    540         int Construct(const ObjectContainer &objects,  
     550        VspKdViewCellsManager(VspKdTree *vspKdTree); 
     551 
     552        int ConstructSubdivision(const ObjectContainer &objects,  
    541553                                  const VssRayContainer &rays); 
    542554 
     
    595607public: 
    596608 
    597         VspBspViewCellsManager(VspBspTree *tree, int constructionSamples); 
     609        VspBspViewCellsManager(VspBspTree *tree); 
    598610        ~VspBspViewCellsManager(); 
    599611 
    600         int Construct(const ObjectContainer &objects,  
     612        int ConstructSubdivision(const ObjectContainer &objects,  
    601613                                  const VssRayContainer &rays); 
    602614 
Note: See TracChangeset for help on using the changeset viewer.