Ignore:
Timestamp:
05/31/06 10:04:05 (18 years ago)
Author:
mattausch
Message:

fixed bug for histogram
improved samplerenderer
todo: difference detectempty true / false

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h

    r971 r997  
    193193        static bool SmallerPvs(const ViewCell *a, const ViewCell *b)  
    194194        { 
    195         return a->GetPvs().GetSize() < b->GetPvs().GetSize(); 
    196   } 
    197  
    198  static bool SmallerRenderCost(const ViewCell *a, const ViewCell *b)  
    199  { 
    200          return a->GetRenderCost() < b->GetRenderCost(); 
    201  } 
    202  
    203  static bool LargerRenderCost(const ViewCell *a, const ViewCell *b)  
    204  { 
    205          return a->GetRenderCost() > b->GetRenderCost(); 
    206  } 
     195                // HACK: take scalar value because pvs may not have been stored properly 
     196#if 1 
     197                return a->mPvsSize < b->mPvsSize; 
     198#else 
     199                return a->GetPvs().GetSize() < b->GetPvs().GetSize(); 
     200#endif 
     201        } 
     202 
     203        static bool SmallerRenderCost(const ViewCell *a, const ViewCell *b)  
     204        { 
     205                return a->GetRenderCost() < b->GetRenderCost(); 
     206        } 
     207 
     208        static bool LargerRenderCost(const ViewCell *a, const ViewCell *b)  
     209        { 
     210                return a->GetRenderCost() > b->GetRenderCost(); 
     211        } 
    207212 
    208213        void SetMergeCost(const float mergeCost); 
     214 
    209215        float GetMergeCost() const; 
    210         static void NewMail(const int reserve = 1) { 
     216 
     217        static void NewMail(const int reserve = 1)  
     218        { 
    211219                sMailId += sReservedMailboxes; 
    212220                sReservedMailboxes = reserve; 
    213221        } 
     222 
    214223        void Mail() { mMailbox = sMailId; } 
    215224        bool Mailed() const { return mMailbox == sMailId; } 
     
    309318 
    310319         
    311         /// points to the currently active view cell. 
     320        /** points to the currently active view cell. This is the 
     321                view cell representing the current brach. 
     322        */ 
    312323        ViewCell *mActiveViewCell; 
    313324}; 
     
    349360 
    350361public: 
     362        /** View cells tree constructor taking a view cell mnanager and 
     363                an environment as parameters. 
     364        */ 
    351365        ViewCellsTree(ViewCellsManager *vcm, Environment *env); 
    352366        ~ViewCellsTree(); 
     
    372386         
    373387        /** Assign colors to the viewcells so that they can be renderered interactively without 
    374           color flickering. 
    375           */ 
     388            color flickering.   
     389        */ 
    376390        void AssignRandomColors(); 
    377391 
    378         /** Updates view cell stats for this particular view cell 
     392        /** Updates view cell stats for this particular view cell. 
    379393        */ 
    380394        void UpdateViewCellsStats(ViewCell *vc, ViewCellsStatistics &vcStat); 
    381395 
    382396 
    383         /** Get costs resulting from each merge step. */ 
     397        /** Get costs resulting from each merge step.  
     398        */ 
    384399        void GetCostFunction(vector<float> &costFunction); 
    385400 
     
    465480 
    466481 
    467         ////////////////////////////////////////////////////////////// 
    468         //                 merge related stuff                      // 
    469         ////////////////////////////////////////////////////////////// 
     482        ///////////////////////////////////////////////////////////////// 
     483        //                    merge related stuff                      // 
     484        ///////////////////////////////////////////////////////////////// 
    470485 
    471486        /** Computes render cost of the merged pvs. 
     
    525540                                                           const int numNewViewCells); 
    526541 
    527         /** merge queue must be reset after some time because expected value 
     542        /** Merge queue must be reset after some time because expected value 
    528543                may not be valid. 
    529544        */ 
     
    535550        int UpdateActiveViewCells(ViewCellContainer &viewCells); 
    536551 
     552        /** Helper function pullling pvs as high up in the tree as possible. 
     553        */  
    537554        void PullUpVisibility(ViewCellInterior *interior); 
    538555 
     556        /** Compress pvs of view cell and children. 
     557        */ 
    539558        void CompressViewCellsPvs(ViewCell *root); 
    540559 
Note: See TracChangeset for help on using the changeset viewer.