From Glenn Waldron, "I'm using an IntersectionVisitor with a PagedLOD database, employing a ReadCallback to allow the intersector to traverse the paged nodes. I discovered that if the visitor is unable (for any reason) to load a subtile via the ReadCallback, the intersection fails. However, I had the requirement to "fall back" on the lower-resolution parent tile and settle for that intersection.
This was easy to implement simply by overriding IntersectionVisitor::apply(PagedLOD). My question is: Are there any opinions on whether this should be the default behavior? If it makes sense, I will submit the change; if not, no worries."
This commit is contained in:
@@ -254,7 +254,8 @@ void IntersectionVisitor::apply(osg::PagedLOD& plod)
|
||||
{
|
||||
highestResChild = _readCallback->readNodeFile( plod.getDatabasePath() + plod.getFileName(plod.getNumFileNames()-1) );
|
||||
}
|
||||
else if (plod.getNumChildren()>0)
|
||||
|
||||
if ( !highestResChild.valid() && plod.getNumChildren()>0)
|
||||
{
|
||||
highestResChild = plod.getChild( plod.getNumChildren()-1 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user