[osg-users] how to get model scale?

Vincent Bourdier vincent.bourdier at gmail.com
Thu Sep 18 08:26:25 PDT 2008


Hi

Maybe the camera is only moved and not scaled... try with getTrans();

Vincent.

2008/9/18 forest37 <forest37 at 163.com>

>
>  hi all,
>     When the secne is zoomed in or out ,I want to get the zoom scale.I do
> it like this:
>     osg::Camera* camera= viewer.getCamera();
>     osg::Matrix vm=camera->getViewMatrix();
>     osg::Vec3 scale=vm.getScale();
>
>     the result is that scale always equals to (1,1,1).What does this mean
> and how can I get the reall scale of the scene?
>
>     thanks
>
> best regards
>
> forest
>
>
>
>
> ------------------------------
> [广告] 买房不必东奔西走,上房老大,看"二手房"网上房展会<http://popme.163.com/link/003984_0909_8679.html>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080918/75362772/attachment-0003.htm>


More information about the osg-users mailing list