Here's a quick fix to the black dot problem in the OSG branch without
killing the optimization completely. timoore's still working on the
problem from the other end which should eliminate the need for this
optimization all together (I think).
--
Jonathan Wagner
Index: tileentry.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Scenery/tileentry.cxx,v
retrieving revision 1.57
diff -u -r1.57 tileentry.cxx
--- tileentry.cxx 8 May 2007 06:12:27 -0000 1.57
+++ tileentry.cxx 22 May 2007 15:54:18 -0000
@@ -74,9 +74,13 @@
SGUpdateVisitor* updateVisitor = static_cast<SGUpdateVisitor*>(nv);
osg::Vec3 center = node->getBound().center();
- double dist2 = distSqr(updateVisitor->getGlobalEyePos(),
- SGVec3d(center[0], center[1], center[2]));
- if (updateVisitor->getSqrVisibility() < dist2)
+ //double dist2 = distSqr(updateVisitor->getGlobalEyePos(),
+ // SGVec3d(center[0], center[1], center[2]));
+ //if (updateVisitor->getSqrVisibility() < (distance*distance))
+ // return;
+ double distance = dist(updateVisitor->getGlobalEyePos(),
+ SGVec3d(center[0], center[1], center[2])) -
node->getBound().radius();
+ if (updateVisitor->getVisibility() < distance)
return;
traverse(node, nv);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel