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 > [email protected] <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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/17dff320-6f27-4d59-8b7d-ef3537a1fd35%40googlegroups.com.
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

