Ignore:
Timestamp:
10/02/06 19:07:38 (18 years ago)
Author:
mattausch
Message:

updated view cells loading. probably no optimal for performance

File:
1 edited

Legend:

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

    r1545 r1551  
    107107        /** Default destructor. 
    108108        */ 
    109         virtual ~ViewCell() {} 
    110  
     109        virtual ~ViewCell(); 
    111110        /** Returns Pvs. 
    112111        */ 
    113112        const ObjectPvs &GetPvs() const; 
    114  
    115113        /** Returns pvs. 
    116114        */ 
    117115        ObjectPvs &GetPvs(); 
    118  
    119116        /** Completely substitutes the pvs. 
    120117        */ 
    121118        void SetPvs(const ObjectPvs &pvs); 
    122  
    123119        /** Type of view cells. 
    124120        */ 
    125121        int Type() const; 
    126  
    127          
    128122        /** Adds a passing ray to the passing ray container. 
    129123        */ 
    130124        void AddPassingRay(const Ray &ray, const int contributions); 
    131  
    132125        /** Returns volume of the view cell. 
    133126        */ 
    134127        float GetVolume() const; 
    135  
    136128        /** Returns area of the view cell. 
    137129        */ 
    138130        float GetArea() const; 
    139  
    140131        /** Sets the volume of the view cell. 
    141132        */ 
    142133        void SetVolume(float volume); 
    143          
    144134        /** Sets the area of the view cell. 
    145135        */ 
    146136        void SetArea(float area); 
    147  
    148  
    149137        /** if this view cell is the root of a view cell hierarchy 
    150138        */ 
    151139        bool IsRoot() const; 
    152  
    153140        /** Returns parent view cell. 
    154141        */ 
    155142        ViewCellInterior *GetParent() const; 
    156  
    157143        /** Sets parent of this view cell. 
    158144        */ 
    159145        void SetParent(ViewCellInterior *parent); 
    160  
    161  
    162146        /** Sets the mesh for this view cell. 
    163147        */ 
     
    231215 
    232216 
    233  
    234         //////////////// 
     217        ////////// 
    235218        //-- mailing stuff 
    236  
    237219 
    238220        static void NewMail(const int reserve = 1)  
     
    346328        } 
    347329 
    348         /** Returns if this view cell is active. 
     330        /** Returns active view cell, i.e. this view cell or 
     331                a parent view cell which is set as active view cell. 
    349332        */ 
    350333        ViewCell *GetActiveViewCell() const  
     
    355338        void SetActiveViewCell(ViewCell *vc) 
    356339        { mActiveViewCell = vc;} 
    357  
    358340         
    359341        /** points to the currently active view cell. This is the 
     
    375357        ViewCellLeaf(mesh) {  } 
    376358                 
    377  
    378359        bool IsLeaf() const 
    379360        { 
     
    381362        } 
    382363 
    383  
    384         /// Leaf of some hierarchy which is part of this view cell. 
    385         T mLeaf; 
     364        /// Leaves of some hierarchy which contains this view cell. 
     365        vector<T> mLeaves; 
    386366}; 
    387367 
     
    507487        void SetRoot(ViewCell *root); 
    508488 
    509         //float ComputeVolume(ViewCell *vc); 
    510  
    511489        /** Assignes unique ids to view cells. 
    512490        */ 
     
    521499        int CountKdPvs(const ViewCellLeaf *vc) const; 
    522500 
    523         void SetViewCellsManager(ViewCellsManager *vcm) 
    524         { 
    525                 mViewCellsManager = vcm; 
    526         } 
     501        /** Sets pointer to view cells manager. 
     502        */ 
     503        void SetViewCellsManager(ViewCellsManager *vcm); 
    527504 
    528505protected: 
     
    595572        void ResetMergeQueue(); 
    596573 
    597         /** Updates the current top level of view cells. 
     574        /** Updates the current cut of view cells. 
    598575                @returns number of newly merged view cells 
    599576        */ 
     
    643620        /// if the view cell tree hold compressed pvs 
    644621        int mViewCellsStorage; 
    645  
     622        /// pointer to the view cells manager 
    646623        ViewCellsManager *mViewCellsManager; 
     624        /// the root of the view cells hierarchy 
    647625        ViewCell *mRoot; 
    648626 
    649627        /// if merge visualization should be shown 
    650628        bool mExportMergedViewCells; 
    651  
    652          
    653629        /// intermediate container of merged view cells. 
    654630        ViewCellContainer mMergedViewCells; 
    655          
    656  
    657631        /// if merged view cells are refined. 
    658632        bool mRefineViewCells; 
    659  
    660633        /// weights between variance and render cost increase (must be between zero and one) 
    661634        float mRenderCostWeight; 
     
    666639    float mDeviation; 
    667640        float mAvgRenderCost; 
     641         
    668642        /// the area is used for pvs heuristics 
    669643        int mUseAreaForPvs; 
    670  
     644        /// number of currently active view cells (=current cut) 
    671645        int mNumActiveViewCells; 
    672  
    673646        /// minimal number of view cells 
    674647        int mMergeMinViewCells; 
Note: See TracChangeset for help on using the changeset viewer.