Changeset 1137 for GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h
- Timestamp:
- 07/17/06 18:17:09 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h
r1135 r1137 749 749 void AddViewCellReferences(ViewCell *vc) const; 750 750 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 751 756 752 757 /// pointer to the hierarchy of view cells … … 900 905 /** Computes best cost for axis aligned planes. 901 906 */ 902 float EvalLocalCostHeuristics(const VspTraversalData & data,907 float EvalLocalCostHeuristics(const VspTraversalData &tData, 903 908 const AxisAlignedBox3 &box, 904 909 const int axis, … … 1365 1370 struct SortableEntry 1366 1371 { 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 */ 1367 1376 enum EType 1368 1377 { 1369 ERayMin, 1370 ERayMax 1378 BOX_MIN, 1379 BOX_MAX, 1380 BOX_INTERSECT 1371 1381 }; 1372 1382 … … 1374 1384 //int mPvs; 1375 1385 float mPos; 1376 1386 VssRay *mRay; 1387 1377 1388 Intersectable *mObject; 1378 1389 1379 1390 SortableEntry() {} 1380 1391 1381 SortableEntry(const int type, 1392 SortableEntry(const int type, 1382 1393 //const float pvs, 1383 1394 const float pos, 1384 Intersectable *obj): 1395 Intersectable *obj, 1396 VssRay *ray): 1385 1397 mType(type), 1386 1398 //mPvs(pvs), 1387 1399 mPos(pos), 1388 mObject(obj) 1400 mObject(obj), 1401 mRay(ray) 1389 1402 {} 1390 1403 … … 1417 1430 float EvalRenderCostDecrease(const AxisAlignedPlane &candidatePlane, 1418 1431 const OspTraversalData &data) const; 1419 1420 float EvalViewCellPvsIncr(Intersectable *object) const;1421 1432 1422 1433 … … 1490 1501 /** Computes best cost for axis aligned planes. 1491 1502 */ 1492 float EvalLocalCostHeuristics(const OspTraversalData & data,1503 float EvalLocalCostHeuristics(const OspTraversalData &tData, 1493 1504 const AxisAlignedBox3 &box, 1494 1505 const int axis, … … 1565 1576 float GetMemUsage() const; 1566 1577 1567 /** Evaluates the influence on the pvs of the visibility event ve.1578 /** Evaluates the influence on the pvs of the event. 1568 1579 @param ve the visibility event 1569 1580 @param pvsLeft updates the left pvs 1570 1581 @param rightPvs updates the right pvs 1571 1582 */ 1572 void Eval ViewCellVolumeIncr(const SortableEntry &ve,1583 void EvalHeuristicsContribution(const SortableEntry &ci, 1573 1584 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); 1578 1592 1579 1593 /** Prepares objects for the cost heuristics. 1580 1594 @returns pvs size of the node 1581 1595 */ 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); 1588 1601 1589 1602 /** Prepares construction for vsp and osp trees. … … 1605 1618 1606 1619 protected: 1620 1621 VspTree *mVspTree; 1607 1622 1608 1623 /// The view cells manager
Note: See TracChangeset
for help on using the changeset viewer.