Le Thu, 04 Dec 2008 23:15:51 +0100, Dusten Sobotta <[EMAIL PROTECTED]> a écrit:

> Hello,
>
> I implemented a dynamic hud manager in c++ whose public member functions are
> bound to lua.  From a lua interface, the user is able to create hud
> elements, and hud element groups; in addition controls are given to disable
> both groups and individual hud elements.  This logic works fine, however a
> problem comes in when trying to enable an element or group that is already
> in the scene--two copies now exist.  It seems like quite a bit of overhead
> to track whether or not each individual group and element is in the scene;
> is there some way to remove -all- children that share the same reference
> pointer?  By executing "removeChild( ptr )", it only removes the most recent
> addition.
>
>
> Thanks in advance,
>
> Dusten

Hi Dusten,

Hmmm... I guess you'll have to implement it "by hand". My suggestion is that 
you code an update callback that will remove duplicated pointers among children.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to