Hi Hui,
You can only get a NodeVisitor if a NodeVisitor is used to fire off
the handle call, and this only happens when you attach a event handler
as node event callback. Event handlers attached directly to the
viewer aren't visited by a visitor to the visitor pointer will be
null.
Robert.
On Tue, Jun 24, 2008 at 4:42 PM, hui <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> In GUIEventHandler class the handle function is like :
>
> handle(
>
> const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object*,
> osg::NodeVisitor* nv);
>
> But I implement it and find NodeVisitor nv is always empty. How can I set a
> nodeVisitor to this function? I trace the code and find this function is
> called by viewer class with
>
> Viewer::eventTraversal()
>
> {
>
> ...
>
> (*hitr)->handleWithCheckAgainstIgnoreHandledEventsMask( *
>
> event, *this, 0, 0);
>
> ....
>
> }
>
> it looks like the nodeVisitor is always empty.
>
>
>
> Thanks in advance
>
>
>
> Hui
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org