Changeset 1077 for GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h
- Timestamp:
- 07/05/06 16:21:45 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h
r1074 r1077 882 882 float maxBand); 883 883 884 /** Prepares objects for SAH.885 @returns pvs size of the ray container886 */887 int PrepareHeuristics(const RayInfoContainer &rays);888 889 int PrepareHeuristics(Intersectable *object);890 891 884 /** Computes pvs increase with respect to the previous pvs for SAH. 892 885 */ … … 916 909 void RemoveContriFromPvs(KdLeaf *leaf, int &pvs) const; 917 910 void AddContriToPvs(KdLeaf *leaf, int &pvs) const; 911 912 /** Prepares objects for SAH. 913 @returns pvs size of the ray container 914 */ 915 int PrepareHeuristics(const RayInfoContainer &rays); 916 917 int PrepareHeuristics(Intersectable *object); 918 918 919 919 /** Subdivides the rays into front and back rays according to the split plane. … … 1333 1333 // For sorting objects 1334 1334 // -------------------------------------------------------------- 1335 struct SortableEntry1335 struct SortableEntry 1336 1336 { 1337 enum EType1337 enum 1338 1338 { 1339 ERayMin,1340 ERayMax1339 BOX_MIN, 1340 BOX_MAX 1341 1341 }; 1342 1342 1343 1343 int type; 1344 1344 float value; 1345 VssRay *ray;1346 1345 Intersectable *mObject; 1346 1347 1347 SortableEntry() {} 1348 SortableEntry(const int t, const float v, VssRay *r):type(t), 1349 value(v), ray(r) 1348 1349 SortableEntry(const int t, const float v, Intersectable *obj): 1350 type(t), value(v), mObject(obj) 1351 {} 1352 1353 bool operator<(const SortableEntry &b) const 1350 1354 { 1351 } 1352 1353 friend bool operator<(const SortableEntry &a, const SortableEntry &b) 1354 { 1355 return a.value < b.value; 1355 return value < b.value; 1356 1356 } 1357 1357 }; 1358 1358 1359 1359 1360 /** faster evaluation of split plane cost for kd axis aligned cells. 1360 1361 */ … … 1449 1450 /** Computes best cost for axis aligned planes. 1450 1451 */ 1451 float EvalLocalCostHeuristics(const RayInfoContainer &rays,1452 /* float EvalLocalCostHeuristics(const RayInfoContainer &rays, 1452 1453 const AxisAlignedBox3 &box, 1453 1454 const int pvsSize, 1454 1455 const int axis, 1455 1456 float &position); 1457 */ 1458 float EvalLocalCostHeuristics(BspLeaf *node, 1459 const AxisAlignedBox3 &box, 1460 const int axis, 1461 float &position, 1462 int &objectsBack, 1463 int &objectsFront); 1456 1464 1457 1465 /** Subdivides the rays into front and back rays according to the split plane. … … 1523 1531 float GetMemUsage() const; 1524 1532 1533 /** Evaluates the influence on the pvs of the visibility event ve. 1534 @param ve the visibility event 1535 @param pvsLeft updates the left pvs 1536 @param rightPvs updates the right pvs 1537 */ 1538 void EvalPvsIncr(const SortableEntry &ve, 1539 int &pvsLeft, 1540 int &pvsRight) const; 1541 1542 void RemoveContriFromPvs(Intersectable *object, int &pvs) const; 1543 void AddContriToPvs(Intersectable *object, int &pvs) const; 1544 1545 /** Prepares objects for SAH. 1546 @returns pvs size of the ray container 1547 */ 1548 int PrepareHeuristics(const RayInfoContainer &rays); 1549 1550 int PrepareHeuristics(Intersectable *object); 1525 1551 1526 1552 protected:
Note: See TracChangeset
for help on using the changeset viewer.