[osg-users] Perform actions when a child node is added

Robert Osfield robert.osfield at gmail.com
Mon Jun 26 02:15:43 PDT 2017


Hi Bruno,

On 23 June 2017 at 23:45, Bruno Oliveira
<bruno.manata.oliveira at gmail.com> wrote:
> I actually tried it already, in my nodes derived doth from osg::Group* and
> osg::PagedLOD*.
> However, overloading the PagedLOD's functions made my scene crash the app
> during the cull traversal (my overload was rewriting the node's center,
> radius and InitialBound...)

If you've got a crash it'll likely be because what you are doing
somewhere is buggy, perhaps an assumption somewhere.  Overriding
addChild/insertChild() won't cause a crash if done properly.

In the case of paged databases nodes are added and removed, the later
can cause problems such as if your code just uses C pointers to these
nodes assuming that they'll always be around.

I can't say what might have caused the crash for you as I know nothing
about the code you've written or what the crash is, or exactly what
circumstances it happens in.

You'll have a debugger, your have your code, your data, you're the
person best placed to debug it.

Robert.



More information about the osg-users mailing list