Hi Sukender,

The reasons why there is no add/remove are two fold:

1)  API simplicity (only two methods)
2) Object size (only requires a single pointer)

You can chain multiple node callbacks together in a linked list.  See
the NodeCallback API.

Robert.

On Tue, Dec 2, 2008 at 11:33 PM, Sukender <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Here is a tiny suggestion: adding a few convinience methods to osg::Node 
> (ouch!). Just tell me if you find them useful:
>
> /** Convinience method that sets the update callback of the node if it 
> doesn't exist, or nest it into the existing one. */
> void addUpdateCallback(NodeCallback* nc);
>
> /** Convinience method that removes a given callback from a node, even if 
> that callback is nested. There is no error return in case the given callback 
> is not found. */
> void removeUpdateCallback(NodeCallback* nc);
>
> ... and the same for Event and Cull callbacks methods.
>
> Code attached: <Node> header modified from tag 2.7.6 (I just hope there is no 
> typo in it!)
>
> Sukender
> PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to