Ignore:
Timestamp:
04/20/06 13:25:41 (18 years ago)
Author:
mattausch
Message:

after rendering workshop submissioin
x3dparser can use def - use constructs
implemented improved evaluation (samples are only stored in leaves, only propagate pvs size)

File:
1 edited

Legend:

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

    r746 r752  
    9090class ViewCell: public MeshInstance 
    9191{ 
     92        friend class ViewCellsTree; 
     93        friend class ViewCellsManager; 
     94        friend class VspBspViewCellsManager; 
     95        friend class BspViewCellsManager; 
     96        friend class VspBspTree; 
     97        friend class BspTree; 
     98 
     99 
    92100public: 
    93101        ViewCell(); 
     
    104112        */ 
    105113        const ObjectPvs &GetPvs() const; 
     114 
    106115        ObjectPvs &GetPvs(); 
    107116 
     117        /** Type of view cells. 
     118        */ 
    108119        int Type() const; 
    109120 
     
    151162        float GetRenderCost() const; 
    152163 
    153   /** set color for visiualizations */ 
    154   void SetColor(const RgbColor &color) { 
    155         mColor = color; 
    156   } 
    157  
    158   /** get color for visualuzations */ 
    159   RgbColor GetColor() const { 
    160         return mColor; 
    161   } 
     164        /** set color for visiualizations. 
     165        */ 
     166        void SetColor(const RgbColor &color); 
     167 
     168        /** get color for visualuzations. 
     169        */ 
     170    RgbColor GetColor() const; 
    162171 
    163172   
     
    173182        virtual bool IsLeaf() const = 0; 
    174183 
    175   static bool SmallerPvs(const ViewCell *a, 
    176                                                  const ViewCell *b) { 
     184        static bool SmallerPvs(const ViewCell *a, const ViewCell *b)  
     185        { 
    177186        return a->GetPvs().GetSize() < b->GetPvs().GetSize(); 
    178187  } 
     
    205214        bool IsActive() const; 
    206215 
     216 
    207217        // last mail id -> warning not thread safe! 
    208218        // both mailId and mailbox should be unique for each thread!!! 
     
    228238        /** color used for consistent visualization */ 
    229239        RgbColor mColor; 
     240 
     241         
     242        /// pvs size, used for lazy pvs computation 
     243        int mPvsSize; 
     244        bool mPvsSizeValid; 
     245 
    230246}; 
    231247 
     
    233249class ViewCellInterior: public ViewCell 
    234250{ 
     251        friend class ViewCellsManager; 
    235252public: 
    236253        ViewCellInterior(); 
     
    292309{ 
    293310        friend class ViewCellsManager; 
     311 
     312 
    294313public: 
    295314        ViewCellsTree(ViewCellsManager *vcm); 
     
    355374        float GetMemoryCost(ViewCell *vc) const; 
    356375 
    357         /** Compresses the pvs of the view cells from the root. 
    358         */ 
    359         void CompressViewCellsPvs(); 
     376        /** Sets method of storage for view cells. 
     377        */ 
     378        void SetViewCellsStorage(int type); 
     379 
     380        /** pvs storage methods */ 
     381        enum {PVS_IN_INTERIORS, COMPRESSED, PVS_IN_LEAVES}; 
    360382 
    361383        /** If view cells in this tree have compressed pvs. 
    362384        */ 
    363         bool IsCompressed() const; 
     385        int ViewCellsStorage() const; 
    364386 
    365387        /** Returns active view cell that is in the path of this view cell. 
     
    485507 
    486508        /// if the view cell tree hold compressed pvs 
    487         bool mIsCompressed; 
     509        int mViewCellsStorage; 
    488510 
    489511        ViewCellsManager *mViewCellsManager; 
     
    494516 
    495517         
    496                  
     518        /** intermediate container of merged view cells. 
     519*/ 
    497520        ViewCellContainer mMergedViewCells; 
    498521         
Note: See TracChangeset for help on using the changeset viewer.