Ignore:
Timestamp:
01/27/06 16:27:22 (19 years ago)
Author:
mattausch
Message:

started to include variance into the measures

File:
1 edited

Legend:

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

    r578 r579  
    785785        void SetLeaf2(BspLeaf *l); 
    786786 
    787         BspLeaf *GetLeaf1(); 
    788         BspLeaf *GetLeaf2(); 
     787        BspLeaf *GetLeaf1() const; 
     788        BspLeaf *GetLeaf2() const; 
    789789 
    790790        /** Merge cost of this candidate pair. 
     
    792792        float GetMergeCost() const; 
    793793 
     794        /** Render cost of this candidate. 
     795        */ 
     796        float GetRenderCost() const; 
     797 
     798        /** returns increase in variance of this view cell. 
     799        */ 
     800        float GetVarianceIncr() const; 
     801 
    794802        /** Returns cost of leaf 1. 
    795803        */ 
    796804        float GetLeaf1Cost() const; 
     805         
    797806        /** Returns cost of leaf 2. 
    798807        */ 
    799808        float GetLeaf2Cost() const; 
    800809 
    801         /// maximal pvs size 
    802         static int sMaxPvsSize; 
    803         /// minimal pvs size 
    804         //static int sMinPvsSize; 
     810        /** Variance of leaf1 
     811        */ 
     812        float GetLeaf1Variance() const; 
     813 
     814        /** Variance of leaf2 
     815        */ 
     816        float GetLeaf2Variance() const; 
    805817 
    806818        /// overall cost used to normalize cost ratio 
    807819        static float sOverallCost; 
    808         // if area or volume should be used for the merge heuristics 
     820        static float sExpectedCost; 
     821        static float sVariance; 
     822 
     823        static int sNumViewCells; 
     824 
     825        // weights between variance and render cost increase (must between zero and one) 
     826        static float sRenderCostWeight; 
     827 
     828        /// if area or volume should be used for the merge heuristics 
    809829        static bool sUseArea; 
    810830 
    811         static int sUpperPvsLimit; 
    812         static int sLowerPvsLimit; 
     831        /// pointer to view cells manager 
     832        static ViewCellsManager *sViewCellsManager; 
    813833 
    814834protected: 
     
    819839        void EvalMergeCost(); 
    820840 
    821         /** penalty for a given pvs size. 
    822         */ 
    823         inline float EvalPvsPenalty(int pvs) const; 
    824  
    825         /** Cost of a view cell. 
    826         */ 
    827         float GetCost(ViewCell *vc) const; 
     841        /** render cost of a view cell. 
     842        */ 
     843        float GetRenderCost(ViewCell *vc) const; 
    828844         
    829845        int mLeaf1Id; 
    830846        int mLeaf2Id; 
    831847 
    832         float mMergeCost; 
    833          
     848        /// render cost increase by this merge 
     849        float mRenderCost; 
     850        /// increase / decrease of variance 
     851        float mVarianceIncr; 
     852 
    834853        BspLeaf *mLeaf1; 
    835854        BspLeaf *mLeaf2; 
Note: See TracChangeset for help on using the changeset viewer.