Forgot to mention: To reproduce the issues, execute osgpick with the two
test cases I attached to the post below.
   -Paul
 


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Martz
Sent: Wednesday, June 25, 2008 12:14 PM
To: 'OpenSceneGraph Submissions'
Subject: [osg-submissions] PagedLOD and IntersectionVisitor


Hi Robert -- Hope you're having a good holiday.
 
The method IntersectionVisitor::apply(osg::PagedLOD&) appears to attempt to
identify a "highest res" child of the PagedLOD and only allow intersection
on that child. The implementation appears to be flawed in two cases:
 
1) The "highest res" child is assumed to be the child with index
"getNumFileNames()-1" or "getNumChildren()-1". As a result, PagedLODs that
do not sort children from furthest to nearest will intersect with the wrong
child. (see attached "case1.osg" to reproduce this problem.)
 
2) The code assumes there is only one highest res child. As a result.
PagedLODs with multiple children at the same highest res range can only
intersect one of those children. ("case2.osg" demonstrates this issue; you
can only pick the quad on the right.)
 
I've attached a modified IntersectionVisitor.cpp that attempts to resolve
these issues. It identifies a highest res range based on the range mode,
then continues traversal on all valid children corresponding to that range
description. Only in the case of a malformed PagedLOD does the code fall
back to getting the last child in the list.
 
Thanks,
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com <http://www.skew-matrix.com/> 
+1 303 859 9466
 

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to