Ignore:
Timestamp:
12/01/05 18:50:06 (19 years ago)
Author:
mattausch
Message:

added visibilitymanager
removed area computation from bsp

File:
1 edited

Legend:

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

    r440 r441  
    364364                /// rays piercing this node 
    365365                BoundedRayContainer *mRays; 
    366                 /// area of current node 
    367                 float mArea; 
    368                 BspNodeGeometry *mGeometry; 
    369  
     366                 
    370367                /// pvs size 
    371368                int mPvs; 
     
    385382                mViewCell(NULL), 
    386383                mRays(NULL), 
    387                 mPvs(0), 
    388                 mArea(0.0), 
    389                 mGeometry(NULL) 
     384                mPvs(0) 
    390385                {} 
    391386                 
     
    395390                                                 ViewCell *viewCell, 
    396391                                                 BoundedRayContainer *rays, 
    397                                                  int pvs, 
    398                                                  float area, 
    399                                                  BspNodeGeometry *cell):  
     392                                                 int pvs):  
    400393                mNode(node),  
    401394                mPolygons(polys),  
     
    403396                mViewCell(viewCell), 
    404397                mRays(rays), 
    405                 mPvs(pvs), 
    406                 mArea(area), 
    407                 mGeometry(cell) 
     398                mPvs(pvs) 
    408399                {} 
    409400    }; 
     
    412403 
    413404        /** Default constructor creating an empty tree. 
    414                 @param viewCell view cell corresponding to unbounded space 
    415405        */  
    416         BspTree(BspViewCell *viewCell); 
    417  
     406        BspTree(); 
     407         
    418408        ~BspTree(); 
    419409 
     410         
    420411        const BspTreeStatistics &GetStatistics() const;  
    421412   
     
    506497        BspLeaf *GetRandomLeaf(const bool onlyUnmailed = false); 
    507498 
    508         /** Returns true if merge criteria are reached. 
    509         */ 
    510     bool ShouldMerge(BspLeaf *front, BspLeaf *back) const; 
    511  
    512         /** Merges view cells based on some criteria 
    513             E.g., empty view cells can pe purged, view cells which have  
    514                 a very similar PVS can be merged to one larger view cell. 
    515  
    516                 @returns true if merge was successful. 
    517         */ 
    518         bool MergeViewCells(BspLeaf *front, BspLeaf *back) const; 
    519  
    520499        /** Traverses tree and counts all view cells as well as their PVS size. 
    521500        */ 
    522501        void EvaluateViewCellsStats(BspViewCellsStatistics &stat) const; 
     502 
     503        /** Returns view cell corresponding to unbounded space. 
     504        */ 
     505        BspViewCell *GetRootCell() const; 
    523506 
    524507        /** Parses the environment and stores the global BSP tree parameters 
     
    601584        float SplitPlaneCost(const Plane3 &candidatePlane,  
    602585                                                 const BoundedRayContainer &rays, 
    603                                                  const int pvs, 
    604                                                  const float area, 
    605                                                  const BspNodeGeometry &cell) const; 
     586                                                 const int pvs) const; 
    606587 
    607588        /** Filters next view cell down the tree and inserts it into the appropriate leaves 
     
    834815        /// number of candidates for split planes evaluated using the rays 
    835816        int mMaxRayCandidates; 
    836          
     817        /// maximum tests for split plane evaluation with a single candidate 
     818        int mMaxTests; 
     819 
    837820        float mCtDivCi; 
    838821 
     
    856839        float mBalancedViewCellsFactor; 
    857840 
    858         //-- thresholds used for view cells merge 
    859         int mMinPvsDif; 
    860         int mMinPvs; 
    861         int mMaxPvs; 
    862841        /// if area or accumulated ray lenght should be used for PVS heuristics 
    863         bool mPvsUseArea; 
     842        bool mPvsUseLen; 
    864843 
    865844private: 
Note: See TracChangeset for help on using the changeset viewer.