Hi Anders,
On 6 August 2013 09:40, Anders Backman <[email protected]> wrote:
> So you cannot find this out through a pointer to the viewer? You need to go
> through the EventAdapter?
You can get the last event via the osgViewer::View::getEventQueue() method, i.e.
osgGA::GUIEventAdapt::PointerDataList& pdl =
viewer.getEventQueue()->getCurrentEventState()->getPointerDataList();
if (!pdl.empty())
{
Camera* camera = dynamic_cast<osg::Camera*>(pdl.back()->object);
}
If you are handling events then the event itself will have all this
information. I realize the new scheme is more complicated but it's
much more flexible and robust at handling sophisticated camera setups.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org