Ignore:
Timestamp:
08/28/06 18:42:33 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1289 r1291  
    548548    int CastLineSegment(const Vector3 &origin, 
    549549                                                const Vector3 &termination, 
    550                                                 ViewCellContainer &viewcells); 
     550                                                ViewCellContainer &viewcells, 
     551                                                const bool useMailboxing = true); 
    551552 
    552553                 
     
    618619        void GetViewCells(const VssRay &ray, ViewCellContainer &viewCells); 
    619620 
    620  
     621        /** Returns view cells tree. 
     622        */ 
    621623        ViewCellsTree *GetViewCellsTree() const { return mViewCellsTree; } 
    622624 
     625        /** Sets the view cells tree. 
     626        */ 
    623627        void SetViewCellsTree(ViewCellsTree *vt) { mViewCellsTree = vt; } 
    624628 
     
    763767        int EvalPvsSize(const RayInfoContainer &rays) const; 
    764768 
    765         /** Computes pvs increase with respect to the previous pvs for heuristics. 
    766         */ 
    767         int GetPvsIncr(Intersectable *object, const KdPvsMap &activeNodes); 
    768  
    769         /** Returns absolute pvs contribution of this object. 
    770         */ 
    771         int GetPvsContribution(Intersectable *object) const; 
    772  
    773769        /** Computes best cost for axis aligned planes. 
    774770        */ 
     
    778774                                                                  float &position); 
    779775 
     776 
     777 
     778        ////////////////////////////////////////// 
     779        // Helper function for computing heuristics 
     780 
    780781        /** Evaluates the contribution to left and right pvs at a visibility event ve. 
    781782                @param ve the visibility event 
     
    783784                @param rightPvs updates the right pvs 
    784785        */ 
    785         void EvalHeuristicsContribution( 
    786                 const SortableEntry &ve,  
    787                 int &pvsLeft,  
    788                 int &pvsRight) const; 
    789  
    790         /** Evaluates contribution of the ray to the left and right pvs. 
     786        void EvalHeuristics(const SortableEntry &ve, int &pvsLeft, int &pvsRight) const; 
     787 
     788        /** Evaluates contribution of min event to pvs 
    791789        */ 
    792790        int EvalMinEventContribution( 
    793791                const VssRay &ray, const bool isTermination) const; 
    794792 
     793        /** Evaluates contribution of max event to pvs 
     794        */ 
    795795        int EvalMaxEventContribution( 
    796796                const VssRay &ray, const bool isTermination) const; 
    797797 
     798        /** Evaluates contribution of kd leaf when encountering a min event 
     799        */ 
    798800        int EvalMinEventContribution(KdLeaf *leaf) const; 
     801        /**  Evaluates contribution of kd leaf when encountering a max event 
     802        */ 
    799803        int EvalMaxEventContribution(KdLeaf *leaf) const; 
    800804 
    801805        /** Prepares objects for the heuristics. 
    802                 @returns pvs size of the ray container 
     806                @returns pvs size as seen by the rays. 
    803807        */ 
    804808        int PrepareHeuristics(const RayInfoContainer &rays); 
     809         
     810        /** Prepare a single ray for heuristics. 
     811        */ 
    805812        int PrepareHeuristics(const VssRay &ray, const bool isTermination); 
     813        /** Prepare a single kd leaf for heuristics. 
     814        */ 
    806815        int PrepareHeuristics(KdLeaf *leaf); 
     816 
     817        ///////////////////////////////////////////////////////////////////////////// 
     818 
    807819 
    808820        /** Subdivides the rays into front and back rays according to the split plane. 
     
    831843         
    832844        */ 
    833         void UpdateObjPvsContri( 
     845        void UpdateContributionsToPvs( 
     846                const VssRay &ray, 
     847                const bool isTermination, 
     848                const int cf, 
     849                float &frontPvs, 
     850                float &backPvs, 
     851                float &totalPvs) const; 
     852 
     853        /** Evaluates the contribution for objects. 
     854        */ 
     855        void UpdateContributionsToPvs( 
    834856                Intersectable *obj,  
    835857                const int cf,  
     
    838860                float &totalPvs) const; 
    839861 
    840         void UpdateBvhLeafPvsContri( 
     862        /** Evaluates the contribution for bounding volume leaves. 
     863        */ 
     864        void UpdateContributionsToPvs( 
    841865                BvhLeaf *leaf, 
    842866                const int cf, 
     
    845869                float &totalPvs) const; 
    846870 
    847          
    848         /** See UpdateObjPvsContri.  
    849         */ 
    850         void UpdateKdLeafPvsContri(KdLeaf *leaf, 
     871        /** Evaluates the contribution for kd leaves. 
     872        */ 
     873        void UpdateContributionsToPvs( 
     874                KdLeaf *leaf, 
    851875                const int cf, 
    852876                float &frontPvs, 
     
    854878                float &totalPvs) const; 
    855879 
    856         /** Collects pvs from rays. 
    857         */ 
    858         void CollectPvs(const RayInfoContainer &rays, 
    859                                         ObjectContainer &objects) const; 
    860  
    861880        /** Returns true if tree can be terminated. 
    862881        */ 
     
    916935                RayInfoContainer &rays); 
    917936 
    918         /** Add pvs contribution of this ray. 
    919         */ 
    920         int EvalPvsContribution(const VssRay &ray, const bool isTermination) const; 
     937        /** Evaluates pvs contribution of this ray. 
     938        */ 
     939        int EvalContributionToPvs(const VssRay &ray, const bool isTermination) const; 
     940 
     941        /** Evaluates pvs contribution of a kd node. 
     942        */ 
     943        int EvalContributionToPvs(KdLeaf *leaf) const; 
     944 
    921945 
    922946protected: 
Note: See TracChangeset for help on using the changeset viewer.