[osg-users] Embedded Callbacks

Appolloni, Thomas tappollo at harris.com
Mon Sep 10 09:23:06 PDT 2007

I'm working on a system with several 100,000 separate items for
rendering. So, they are being added to the scenegraph via PagedLOD's
since each was originally created as a separate geometry file and later
spatially partitioned at higher levels to reduce the number of actual
distance evaluations. However, our system (using OSG 2.0) allows the
user to dynamically alter the ranges within the LOD's children for each
of the varying object types. For those nodes in memory, it's not a
problem to adjust the ranges via a NodeVisitor traversal when the
changes are activated. The problem is with the nodes that will later

Is there a way to either:
1) include a callback in a node when it's first written to disk so that
it can be activated during its first traversal, get the updated range
changes, and then remove the callback from the node? 
2) externally tie into osgDB::readNodeFile() to dynamically add the
callback after the actual load when the nodes are loaded in viewer? 

Once a node is updated, keeping the callbacks active serves no purpose
and eats a lot of update time.

Tom Appolloni, 
tappollo at harris.com 
Harris Corp (www.harris.com)

More information about the osg-users mailing list