Hi Wu Zhicheng,

The osg::RenderInfo object is used to track the current View and active
Cameras. It's primary use is within the graphics traversal (the RenderInfo
object is passed to Drawable etc.), but you can also get it from the
CullVisitor using the CullVisitor::getRenderInfo() method.  so:

  osg::View* view  = cullvisitor->getRenderInfo().getView();

Robert.



On 1 July 2014 02:52, ttaw <[email protected]> wrote:

> Hi, all:
>   I'm trying to get view pointer in traverse function. I used:
> CullVisitor *cv = dynamic_cast<Cullvsitor *>(nv);
> cv->getCurrentCamera()->getView();
>   This wouldn't work if the current node is a child of a Camera node which
> is in the scenegraph.I'm wondering how to achieve this. Could anybody give
> me some advices? Thanks in advance.
>
>  ------------------
>  Failure is the mother of success.
> Wu Zhicheng
>
>
> _______________________________________________
> 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

Reply via email to