<div dir="ltr">Thanks Alberto. The answer helped me to resize the model as required.<br><br>On Thursday, September 12, 2013 at 8:04:52 PM UTC+8, Alberto Luaces wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">"Zev Lix" writes:
<br>
<br>> Hi, I wonder if there is a way of scaling a model to a specific size?
<br>> So if i have two models that have different sizes when loaded into
<br>> osg, i want to scale these two models so that they have the same
<br>> lenght or width.
<br>>
<br>> Example if i have two models of cars they should both have X length in
<br>> my osg application regardless of how big they were when created in
<br>> some model program.
<br>>
<br>> I know i could just create the models in the right size to start
<br>> with. but this is a problem when adding models made by other people.
<br>
<br>Hi Zev, you can get the total dimensions with the osg::BoundingBox of
<br>the object. Later you can scale it to the right size placing it under a
<br>osg::MatrixTransform node with a scale matrix.
<br>
<br>--
<br>Alberto
<br>
<br>______________________________<wbr>_________________
<br>osg-users mailing list
<br><a href="javascript:" target="_blank" gdf-obfuscated-mailto="j3GukbesogkJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">osg-...@lists.<wbr>openscenegraph.org</a>
<br><a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flists.openscenegraph.org%2Flistinfo.cgi%2Fosg-users-openscenegraph.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhxcobqaKtkSCnaCeBWJ1fFl93mw';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flists.openscenegraph.org%2Flistinfo.cgi%2Fosg-users-openscenegraph.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhxcobqaKtkSCnaCeBWJ1fFl93mw';return true;">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a>
<br></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/17dff320-6f27-4d59-8b7d-ef3537a1fd35%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/17dff320-6f27-4d59-8b7d-ef3537a1fd35%40googlegroups.com</a>.<br />