[osg-users] Getting the main camera.
Robert Osfield
robert.osfield at gmail.com
Wed May 2 11:19:19 PDT 2018
Hi Marlin,
On 2 May 2018 at 18:05, Rowley, Marlin R <marlin.r.rowley at lmco.com> wrote:
> Is there a way to get a pointer to the main rendering camera without
> passing the Viewer around through classes and functions?
>
In the draw traversal the main two objects that are passed around are
osg::RenderInfo and osg::State. The osg::RenderInfo has high level info
such as what is the current View being rendered and what the current Camera
is.
https://github.com/openscenegraph/OpenSceneGraph/blob/master/include/osg/RenderInfo
The RenderInfo is passed to drawables during the draw traversal via:
osg::Drawable::drawImplementation(osg::RenderInfo&)
The CullVisitor also has a handle to the RenderInfo as well as various
other useful state info:
https://github.com/openscenegraph/OpenSceneGraph/blob/master/include/osgUtil/CullVisitor
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180502/f643ef16/attachment.html>
More information about the osg-users
mailing list