HI Paul,

On 2/20/07, Paul Martz <[EMAIL PROTECTED]> wrote:
Is there a reason that FindNamedNodeVisitor isn't in osgUtil? I've seen this
type of request several times now. Having it in osgUtil would reduce
redundant application-specific code.

I haven't introduced a osgUtil::FindNamedNodeVisitor on the
presumption that users will have wider criteria for pattern matching
than just a name.  For instance you might want to find all Geode's, or
all Switch nodes with a specific name, or all node with a specific bit
of user data etc.   Its easy to write a NodeVisitor for any of these
tasks, but difficult to write a visitor flexible enough to cover all
the types of search criteria you might want without getting really
bloated.

Perahps a templated FindNodeVisitor might be sutiable, with pre built
functors for doing things like testing on names.  I'd entertain such a
general purpose Visitor but not one tailored to such a specific search
criteria as just a name.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to