Ignore:
Timestamp:
11/07/05 01:27:32 (19 years ago)
Author:
mattausch
Message:

fixed bug in pvs criterium, computing real area

File:
1 edited

Legend:

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

    r383 r384  
    459459                @returns true if plane contributes to the cell. 
    460460        */ 
    461         bool ConstructChildGeometry(PolygonContainer &newCell, 
     461        bool ConstructChildGeometry(PolygonContainer &childCell, 
    462462                                                            const PolygonContainer &cell, 
    463463                                                            const vector<Plane3 *> &planes, 
     
    535535        /** Evaluates the contribution of the candidate split plane. 
    536536                 
    537                 @param canditatePlane the candidate split plane 
     537                @param candidatePlane the candidate split plane 
    538538                @param polys the polygons the split can be based on 
    539539                @param rays the rays the split can be based on 
     540 
    540541                @returns the cost of the candidate split plane 
    541542        */ 
    542         float SplitPlaneCost(BspLeaf *leaf,  
    543                                  const Plane3 &candidatePlane, 
     543        float SplitPlaneCost(const Plane3 &candidatePlane, 
    544544                                                 const PolygonContainer &polys,                                                   
    545                                                  const BoundedRayContainer &rays) const; 
     545                                                 const BoundedRayContainer &rays, 
     546                                                 const PolygonContainer &cell, 
     547                                                 const vector<Plane3 *> &plane, 
     548                                                 const vector<bool> &sides, 
     549                                                 const int pvsSize) const; 
    546550 
    547551        /** Strategies where the effect of the split plane is tested 
     
    549553                @returns the cost of the candidate split plane 
    550554        */ 
    551         float SplitPlaneCost(BspLeaf *leaf,  
    552                                  const Plane3 &candidatePlane, 
     555        float SplitPlaneCost(const Plane3 &candidatePlane, 
    553556                                                 const PolygonContainer &polys) const; 
    554557 
    555558        /** Strategies where the effect of the split plane is tested 
    556559            on all input polygons. 
     560 
    557561                @returns the cost of the candidate split plane 
    558562        */ 
    559         float SplitPlaneCost(BspLeaf *leaf, 
    560                                  const Plane3 &candidatePlane, 
    561                                                  const BoundedRayContainer &polys) const; 
     563        float SplitPlaneCost(const Plane3 &candidatePlane, 
     564                                                 const BoundedRayContainer &rays, 
     565                                                 const float frontArea, 
     566                                                 const float backArea, 
     567                                                 const int pvsSize) const; 
    562568 
    563569        /** Filters next view cell down the tree and inserts it into the appropriate leaves 
     
    721727        /** Computes the pvs of the front and back leaf with a given classification. 
    722728        */ 
    723         void ComputePvs(Intersectable &obj,  
     729        void AddToPvs(Intersectable &obj,  
    724730                                        float &frontPvs, 
    725731                                        float &backPvs, 
     
    729735                                        const int frontAndBackId) const; 
    730736         
     737        int ComputePvsSize(const BoundedRayContainer &rays) const; 
     738 
    731739        /// Pointer to the root of the tree 
    732740        BspNode *mRoot; 
Note: See TracChangeset for help on using the changeset viewer.