On 10/5/2010 7:41 AM, Tim Moore wrote:
In your cull traversal you can push a matrix on the ModelView stack, traverse
the subgraph, and then pop the matrix without modifying the scene graph at all.
Take a look at osgUtil::CullVisitor::apply(Transform&) to see how this is done.
You do need to be careful that the bounding volume of the node is set so that
the node will be culled properly.
This is the way to go.
Note that if you're using a custom node that derives from Transform, you can
compute the necessary matrix inside the computeLocalToWorld() function, which
gets called during cull to obtain the matrix. Thus each individual cull thread
obtains its own matrix without ever modifying the scene graph.
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org