Hi,

I got a crash when doing intersections on my level.
The problem turned out to be, that the optimizer 
was run on a geometry node, after a KdTree had been build for it.

The IndexMeshVisitor may change the number of vertices in the geometry, 
invalidating the TriangleList in the KdNode.

I fixed this in my code by just setting the kdtree to NULL in the end of 
IndexMeshVisitor::makeMesh, and then rebuilding the kdtree after finishing the 
call to optimize.

I'm not sure if this is a bug, or if the optimizer should just always be run 
before building the kdtree ?

I'm using osgEarth, which calls the optimizer after calling ReadNode. 
This may of course be the reason why KdTrees are not on by default in osgEarth 
;)

Thank you!

Cheers,
Jeroen ;)

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=59814#59814





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

Reply via email to