[osg-users] Setting update callback for osgSim::LightPointNode has no effect

Robert Osfield robert.osfield at gmail.com
Tue Oct 27 06:25:04 PDT 2015


HI Nick,

The way the OSG implement node callbacks are as traversal callbacks that
are nested within the traverse of the node itself, so it's in effect a
traverse children callback.  In the case of osgSim::LightPointNode it's
implemented as a leaf node so doesn't bother calling
NodeVisitor::traverse() to traverse any further so the callbacks aren't
called.

The best I workaround I can think of is subclassing from LightPointNode and
overriding the LightPointNode::traverse() method to add in a
NodeVisitor::traverse() call as well as the LightPointNode::traverse().
Another route might be to add the update callback to the parent.  Or
perhaps just subclass from LightPointNode and treat this subclass as your
update callback etc.

Robert.

On 27 October 2015 at 12:23, Trajce Nikolov NICK <
trajce.nikolov.nick at gmail.com> wrote:

> Hi community,
>
> I installed an update callback to a osgSim::LightPointNode .. However it
> is never called. Any hints, clue?
>
> Thanks as always!
>
> Nick
>
> --
> trajce nikolov nick
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151027/19d7f631/attachment-0003.htm>


More information about the osg-users mailing list