[osg-users] Scale model node to specific size
OpenSceneGraph Users
osg-users at lists.openscenegraph.org
Mon Feb 10 19:48:52 PST 2020
Thanks Alberto. The answer helped me to resize the model as required.
On Thursday, September 12, 2013 at 8:04:52 PM UTC+8, Alberto Luaces wrote:
>
> "Zev Lix" writes:
>
> > Hi, I wonder if there is a way of scaling a model to a specific size?
> > So if i have two models that have different sizes when loaded into
> > osg, i want to scale these two models so that they have the same
> > lenght or width.
> >
> > Example if i have two models of cars they should both have X length in
> > my osg application regardless of how big they were when created in
> > some model program.
> >
> > I know i could just create the models in the right size to start
> > with. but this is a problem when adding models made by other people.
>
> Hi Zev, you can get the total dimensions with the osg::BoundingBox of
> the object. Later you can scale it to the right size placing it under a
> osg::MatrixTransform node with a scale matrix.
>
> --
> Alberto
>
> _______________________________________________
> osg-users mailing list
> osg-... at lists.openscenegraph.org <javascript:>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/17dff320-6f27-4d59-8b7d-ef3537a1fd35%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200210/d4105545/attachment.html>
More information about the osg-users
mailing list