Ignore:
Timestamp:
02/01/06 19:29:59 (18 years ago)
Author:
mattausch
Message:

implemented variance
started implementing merge history

File:
1 edited

Legend:

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

    r579 r580  
    2727class Beam; 
    2828class Preprocessor; 
     29class ViewCellsTree; 
     30class MergeCandidate; 
    2931 
    3032struct BspRay; 
     
    133135                @returns new view cell based on the merging. 
    134136        */ 
    135         ViewCell *MergeViewCells(ViewCell &front, ViewCell &back) const; 
     137        ViewCellInterior *MergeViewCells(ViewCell &front, ViewCell &back) const; 
    136138         
    137139        /** Generates view cell of type specified by this manager 
    138140        */ 
    139         virtual ViewCell *GenerateViewCell(Mesh *mesh = NULL) const; 
     141        virtual ViewCell *GenerateViewCell(Mesh *mesh = NULL) const = 0; 
    140142 
    141143        /** Adds a new view cell to the list of predefined view cells. 
     
    206208        virtual float GetRendercost(ViewCell *viewCell, float objRendercost) const = 0; 
    207209 
    208         /** Returns vector of loaded / generated view cells. 
     210        /** Returns container of loaded / generated view cells. 
    209211        */ 
    210212        ViewCellContainer &GetViewCells(); 
     
    311313        /** Exports view cell geometry. 
    312314        */ 
    313         virtual void ExportVcGeometry(Exporter *exporter, ViewCell *vc) const = 0; 
     315        virtual void ExportViewCellGeometry(Exporter *exporter, ViewCell *vc) const = 0; 
    314316 
    315317        virtual void FinalizeViewCells(const bool createMesh); 
     
    325327        /** Evaluates statistics values on view cells. 
    326328        */ 
    327         void EvaluateRenderStatistics(float &totalRenderCost,  
    328                                                                   float &expectedRenderCost,  
    329                                                                   float &variance); 
     329        void EvaluateRenderStatistics(float &totalRenderCost, 
     330                                                                  float &expectedRenderCost, 
     331                                                                  float &deviation, 
     332                                                                  float &variance, 
     333                                                                  int &totalPvs, 
     334                                                                  float &avgRenderCost); 
     335 
     336 
     337        /** Returns hierarchy of the view cells. 
     338        */ 
     339        ViewCellsTree *GetViewCellsTree(); 
     340 
     341        virtual void CollectMergeCandidates(const VssRayContainer &rays, vector<MergeCandidate> &candidates) = 0; 
     342 
    330343 
    331344protected: 
     
    392405        /// Loaded view cells 
    393406        ViewCellContainer mViewCells; 
     407 
     408        ViewCellsTree *mViewCellsTree; 
    394409 
    395410        /// maximum number of samples taken for construction of the view cells 
     
    417432        bool mOnlyValidViewCells; 
    418433 
     434        /// if rays should be used to collect merge candidates 
     435        bool mUseRaysForMerge; 
     436         
     437 
    419438        //-- visualization options 
    420439         
     
    472491        void CreateMesh(ViewCell *vc); 
    473492 
    474         void ExportVcGeometry(Exporter *exporter, ViewCell *vc) const; 
     493        void ExportViewCellGeometry(Exporter *exporter, ViewCell *vc) const; 
     494         
     495        void CollectMergeCandidates(const VssRayContainer &rays, vector<MergeCandidate> &candidates); 
    475496 
    476497protected: 
     
    529550        bool ViewCellsConstructed() const; 
    530551 
     552        ViewCell *GenerateViewCell(Mesh *mesh) const; 
    531553 
    532554        /** Prints out statistics of this approach. 
     
    540562        void CreateMesh(ViewCell *vc); 
    541563 
    542         void ExportVcGeometry(Exporter *exporter, ViewCell *vc) const; 
     564        void ExportViewCellGeometry(Exporter *exporter, ViewCell *vc) const; 
     565 
     566        void CollectMergeCandidates(const VssRayContainer &rays, vector<MergeCandidate> &candidates); 
    543567 
    544568protected: 
    545569 
     570        /** Collects view cells from a hierarchy. 
     571        */ 
    546572        void CollectViewCells(); 
     573 
    547574        KdNode *GetNodeForPvs(KdLeaf *leaf); 
    548575 
     
    598625        void CreateMesh(ViewCell *vc); 
    599626 
    600         void ExportVcGeometry(Exporter *exporter, ViewCell *vc) const; 
     627        void ExportViewCellGeometry(Exporter *exporter, ViewCell *vc) const; 
     628 
     629        void CollectMergeCandidates(const VssRayContainer &rays, vector<MergeCandidate> &candidates); 
    601630 
    602631protected: 
     
    664693        int CastBeam(Beam &beam); 
    665694 
    666         void ExportVcGeometry(Exporter *exporter, ViewCell *vc) const; 
     695        void ExportViewCellGeometry(Exporter *exporter, ViewCell *vc) const; 
    667696 
    668697        //float GetVolume(ViewCell *viewCell) const; 
    669698 
    670699        void Finalize(ViewCell *viewCell, const bool createMesh); 
     700 
     701        void CollectMergeCandidates(const VssRayContainer &rays, vector<MergeCandidate> &candidates); 
    671702 
    672703protected: 
Note: See TracChangeset for help on using the changeset viewer.