Hi Paul,

On Wed, Jun 25, 2008 at 7:13 PM, Paul Martz <[EMAIL PROTECTED]> wrote:
> Hi Robert -- Hope you're having a good holiday.

Holiday?  My last three trips have all been work I'm afraid.

> 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.)

PagedLOD's that don't have children ordered from lowest to height res
are invalid, and will break the fallback mechanism that  PagedLOD
utilises.  Having multiple children at the same range will also break
this mechanism.  There isn't any code to catch erroneous PagedLODs,
it's currently assumed that the user will set things up appropriately.

How were the files generated?

> 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.

I'll do a review of your changes, but perhaps the problem needs to be
addressed elsewhere, i.e. problem PagedLOD's pickedup after creation.

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

Reply via email to