"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]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to