HI Nilton,

I think you might be misunderstanding the use of the word traverse in
the context of scene graph traversal.  When the NodeVisitor traverse
the scene graph they are consider the internal data structure links
between parent nodes and their children.  In the case of the cull
traversal a subgraph will be not traversed if the bounding volume of
that subgraph is outside the view frustum or an LOD child is out of
range, but in all cases there isn't collision detection like you are
thinking of.

The closest example of collision detection that controls the control
can be found in the osgGA::DriveManipulator which is a
CameraManipulator that controls the movement of the camera in response
to keyboard/mouse actions.  The DriveManipualtor uses
a ray based intersection method to determine it position above terrain.

Robert.

On Tue, Jun 21, 2011 at 2:58 AM, Nilton Paulo <npraimu...@yahoo.com.br> wrote:
> Hi everybody,
>
>  I am not sure that the class "TRAVERSE" could control the transpass of the 
> building walls.
>
>  I would like not to pass by the walls while navigating with the camera.
>
>  My source code is:
>
> nodePath[c]->setUpdateCallback( new SetTransverse() );
> ...
> class SetTransverse : public osg::NodeCallback
> {
> public:
>    SetTransverse() { }
>    virtual void operator()( osg::Node* node, osg::NodeVisitor* nv )
>    {
>        osg::MatrixTransform* mt = dynamic_cast<osg::MatrixTransform*>( node );
>        nv->setTraversalMode(osg::NodeVisitor::TRAVERSE_NONE);
>    }
> };
>
> Does anybody could help me how to use "traverse" properlly?
>
> Thank you!
>
> Cheers,
> Nilton
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=40701#40701
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to