Ignore:
Timestamp:
07/17/06 18:17:09 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1135 r1137  
    749749        void AddViewCellReferences(ViewCell *vc) const; 
    750750 
     751        /** Returns view cells of this ray, either taking precomputed cells 
     752                or by recomputation. 
     753        */ 
     754        void GetViewCells(const VssRay &ray, ViewCellContainer &viewCells); 
     755 
    751756 
    752757        /// pointer to the hierarchy of view cells 
     
    900905        /** Computes best cost for axis aligned planes. 
    901906        */ 
    902         float EvalLocalCostHeuristics(const VspTraversalData &data, 
     907        float EvalLocalCostHeuristics(const VspTraversalData &tData, 
    903908                                                                  const AxisAlignedBox3 &box, 
    904909                                                                  const int axis, 
     
    13651370        struct SortableEntry 
    13661371        { 
     1372                /** There is a 3th "event" for rays which intersect a 
     1373                        box in the middle. These "events" don't induce a change in 
     1374                        pvs size, but may induce a change in view cell volume. 
     1375                */ 
    13671376                enum EType  
    13681377                { 
    1369                         ERayMin, 
    1370                         ERayMax 
     1378                        BOX_MIN, 
     1379                        BOX_MAX, 
     1380                        BOX_INTERSECT 
    13711381                }; 
    13721382 
     
    13741384                //int mPvs; 
    13751385                float mPos; 
    1376  
     1386                VssRay *mRay; 
     1387                 
    13771388                Intersectable *mObject; 
    13781389 
    13791390                SortableEntry() {} 
    13801391 
    1381                 SortableEntry(const int type,  
     1392                SortableEntry(const int type, 
    13821393                        //const float pvs,  
    13831394                        const float pos, 
    1384                         Intersectable *obj): 
     1395                        Intersectable *obj, 
     1396                        VssRay *ray): 
    13851397                mType(type),  
    13861398                //mPvs(pvs),  
    13871399                mPos(pos),  
    1388                 mObject(obj)  
     1400                mObject(obj), 
     1401                mRay(ray) 
    13891402                {} 
    13901403 
     
    14171430        float EvalRenderCostDecrease(const AxisAlignedPlane &candidatePlane, 
    14181431                                                                 const OspTraversalData &data) const; 
    1419  
    1420         float EvalViewCellPvsIncr(Intersectable *object) const; 
    14211432 
    14221433 
     
    14901501        /** Computes best cost for axis aligned planes. 
    14911502        */ 
    1492         float EvalLocalCostHeuristics(const OspTraversalData &data, 
     1503        float EvalLocalCostHeuristics(const OspTraversalData &tData, 
    14931504                const AxisAlignedBox3 &box, 
    14941505                const int axis, 
     
    15651576        float GetMemUsage() const; 
    15661577 
    1567         /** Evaluates the influence on the pvs of the visibility event ve. 
     1578        /** Evaluates the influence on the pvs of the event. 
    15681579                @param ve the visibility event 
    15691580                @param pvsLeft updates the left pvs 
    15701581                @param rightPvs updates the right pvs 
    15711582        */ 
    1572         void EvalViewCellVolumeIncr(const SortableEntry &ve, 
     1583        void EvalHeuristicsContribution(const SortableEntry &ci, 
    15731584                float &volLeft, 
    1574                 float &volRight) const; 
    1575  
    1576         void RemoveContriFromPvs(Intersectable *object, float &pvs) const; 
    1577         void AddContriToPvs(Intersectable *object, float &pvs) const; 
     1585                float &volRight, 
     1586                int &pvsLeft, 
     1587                int &pvsRight); 
     1588 
     1589        /** Evaluate the contributions of view cell volume of the left and the right view cell. 
     1590        */ 
     1591        void EvalVolumeContribution(const VssRay &ray, float &volLeft, float &volRight); 
    15781592 
    15791593        /** Prepares objects for the cost heuristics. 
    15801594                @returns pvs size of the node 
    15811595        */ 
    1582         float PrepareHeuristics(const ObjectContainer &objects); 
    1583  
    1584         /** Evaluates contribution for one object  
    1585                 to heuristics preparation. 
    1586         */ 
    1587         float PrepareHeuristics(Intersectable *object); 
     1596        float PrepareHeuristics(const OspTraversalData &tData); 
     1597 
     1598        /** Prepares heuristics for a particular ray. 
     1599        */ 
     1600        float PrepareHeuristics(const VssRay &ray); 
    15881601 
    15891602        /** Prepares construction for vsp and osp trees. 
     
    16051618 
    16061619protected: 
     1620 
     1621        VspTree *mVspTree; 
    16071622 
    16081623        /// The view cells manager 
Note: See TracChangeset for help on using the changeset viewer.