<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>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?<div>the fuction is that:</div><div><br></div><div><div>osgViewer::Viewer multiventana(int x, int y, int alto, int ancho, int numColumns, int numRows)</div><div>{</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>osgViewer::Viewer viewer;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>int tileWidth = alto / numColumns;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>int tileHeight = ancho / numRows;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>for (int i = 0; i<numRows; ++i)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>for (int j = 0; j<numColumns; ++j)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>osg::ref_ptr<osg::Camera> camera = createSlaveCamera((tileWidth*j) + x, (ancho - tileHeight*(i + 1)) + y, tileWidth - 1, tileHeight - 1);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>osg::Matrix projOffset = osg::Matrix::scale(numColumns, numRows, 1.0) *<span class="Apple-tab-span" style="white-space:pre"> </span>osg::Matrix::translate(numColumns - 1 - 2 * j, numRows - 1 - 2 * i, 0.0);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>viewer.addSlave(camera, projOffset, osg::Matrix(), true);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>return viewer;</div><div>}</div></div><div><br></div> </div></body>
</html>