[osg-submissions] Add slave camera
filip.holm at kongsberg.com
filip.holm at kongsberg.com
Fri Oct 5 03:33:08 PDT 2007
Robert,
This fixes problem with scene data not being attached to slave camera if viewer already has scene data assigned to it. Which was the actual reason I could not see scene data in the CompositeViewer example I posted on the osg-users a couple of days ago.
Consider the following example.
.....
osgViewer viewer;
viewer.setSceneData(pSomeSceneData);
viewer.addSlaveCamera(pSomeSlaveCamera,true); //Expecting pSomeSlaveCamera to be assigned the masters scene data
viewer.run();
.....
Note:
If you're wondering why I have overridden the convenience method addSlaveCamera(Camera*,bool);
It's because of C++ is using hide by name rather than hide by signature. I had not realized this limitation before, so it took me some time to figure out the best approach.
Thanks for this great open source project.
Filip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AddSlaveCameraFix.zip
Type: application/x-zip-compressed
Size: 15267 bytes
Desc: AddSlaveCameraFix.zip
Url : http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20071005/c892bb06/attachment.bin
More information about the osg-submissions
mailing list