[osg-users] Problems add a viewer
alvaro ginestar rodriguez
alvaroginestar at hotmail.com
Fri Sep 18 04:25:51 PDT 2015
Hi everyone, I have a function that returns the viewer settings, but not pass it on to the viewer as the main function, any suggestions?the fuction is that:
osgViewer::Viewer multiventana(int x, int y, int alto, int ancho, int numColumns, int numRows){
osgViewer::Viewer viewer;
int tileWidth = alto / numColumns; int tileHeight = ancho / numRows; for (int i = 0; i<numRows; ++i) { for (int j = 0; j<numColumns; ++j) { osg::ref_ptr<osg::Camera> camera = createSlaveCamera((tileWidth*j) + x, (ancho - tileHeight*(i + 1)) + y, tileWidth - 1, tileHeight - 1); osg::Matrix projOffset = osg::Matrix::scale(numColumns, numRows, 1.0) * osg::Matrix::translate(numColumns - 1 - 2 * j, numRows - 1 - 2 * i, 0.0); viewer.addSlave(camera, projOffset, osg::Matrix(), true); } } return viewer;}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150918/3474e86b/attachment-0002.htm>
More information about the osg-users
mailing list