Hi Art, On Wed, Dec 17, 2008 at 11:33 AM, Art Tevs <[email protected]> wrote: > yes we could also add some kind of getName() which returns a string. However > using a hash based approach would have more performance, because only integer > comparison is needed (if you want to check for the visitor type during a > traversal call for example). It will also remove the VisitorType enum which > isn't really covers the whole bunch of visitor types.
Um... I'm absolutely not about to go breaking the API so VisitorType stays. The VisitorType is very useful for detecting specific types of visitors such as event visitors, cull visitors etc as these have a special role in the OSG as they are a fundamental part of each frame. The rest of the NodeVisitor provided specialist functions. className() is not getName(), one uses getName() for names of objects, className() in the OSG is used exclusively for reporting the name of the class. This is both useful for serialisation and debugging purposes. I'm afraid I don't get the value of hash map in this context, the performance aspect is trivial as this type of operation is done so rarely per frame. I have begun adding className and libraryName and a META_NodeVisitor macro definition of these to all the core OSG node visitor, you are welcome use this or ignore them. I'm certainly not about to drop existing API's to appease you preferences. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

