Ignore:
Timestamp:
11/05/05 12:40:40 (19 years ago)
Author:
mattausch
Message:

worked on pvs heuristics

File:
1 edited

Legend:

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

    r378 r379  
    455455        BspLeaf *GetRandomLeaf(const bool onlyUnmailed = false); 
    456456 
    457         /** Adds halfspace to cell definition. 
    458                 @param side indicates which side of halfspace is added 
    459         */ 
    460         void AddHalfspace(PolygonContainer &cell,  
    461                                           vector<Plane3> &planes, 
    462                                           vector<bool> &sides, 
    463                                           const Plane3 &halfspace,  
    464                                           const bool side) const; 
     457        /** Computes new cell based on the old cell definition and a new split plane 
     458                @param side indicates which side of the halfspace  
     459                @returns true if plane contributes to the cell. 
     460        */ 
     461        bool ComputeChildrenGeometry(PolygonContainer &newCell, 
     462                                                        const PolygonContainer &cell, 
     463                                                        const vector<Plane3> &planes, 
     464                                                        const vector<bool> &sides, 
     465                                                        const Plane3 &splitPlane, 
     466                                                        const bool side) const; 
     467 
    465468 
    466469        /** Returns true if merge criteria are reached. 
     
    602605                @param polygons container of polygons 
    603606                @param rays bundle of rays on which the split can be based 
    604                 @param maxTests the maximal number of candidate tests 
     607                @param maxPolyCandidates the maximal number of tested polygon candidates 
     608                @param maxRayCandidates the maximal number of ray candidates 
    605609        */ 
    606610        Plane3 SelectPlaneHeuristics(PolygonContainer &polys,  
    607611                                                                 const BoundedRayContainer &rays, 
    608                                                                  const int maxTests); 
     612                                                                 const int maxPolyCandidates, 
     613                                                                 const int maxRayCandidates); 
    609614 
    610615        /** Extracts the meshes of the objects and adds them to polygons.  
     
    710715        void ExtractSplitPlanes(BspNode *n, vector<Plane3 *> &planes, vector<bool> &sides) const; 
    711716 
    712         int CountPvs(const BoundedRayContainer &rays) const; 
    713          
    714         float PvsValue(Intersectable &obj,  
    715                                    const int cf,  
    716                                    const int frontId,  
    717                                    const int backId,  
    718                                    const int frontAndBackId) const; 
     717        /** Computes the pvs of the front and back leaf with a given classification. 
     718        */ 
     719        void ComputePvs(Intersectable &obj,  
     720                                        float &frontPvs, 
     721                                        float &backPvs, 
     722                                        const int cf,  
     723                                        const int frontId,  
     724                                        const int backId,  
     725                                        const int frontAndBackId) const; 
    719726         
    720727        /// Pointer to the root of the tree 
    721728        BspNode *mRoot; 
    722  
    723729                 
    724730        BspTreeStatistics mStat; 
     
    764770        static int sSplitPlaneStrategy; 
    765771        /// number of candidates evaluated for the next split plane 
    766         static int sMaxCandidates; 
     772        static int sMaxPolyCandidates; 
     773        static int sMaxRayCandidates; 
    767774        /// BSP tree construction method 
    768775        static int sConstructionMethod; 
Note: See TracChangeset for help on using the changeset viewer.