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

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Tue Oct 27 06:49:37 PDT 2015


Thanks Robert for the hints and the explanation!

Cheers,
Nick

On Tue, Oct 27, 2015 at 2:25 PM, Robert Osfield <robert.osfield at gmail.com>
wrote:

> 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
>>
>>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151027/8802f308/attachment-0003.htm>


More information about the osg-users mailing list