[osg-users] how to get model scale?

Tomlinson, Gordon GTOMLINSON at overwatch.textron.com
Thu Sep 18 08:24:27 PDT 2008

if you want to just zoom then adjust the Horizontal field view
If you want to scale the scene, parent the scene to a transform and set the scale on the transform  ( not the view matrix)


Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com

(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
- Master Tambo Tetsura



From: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of forest37
Sent: Thursday, September 18, 2008 11:22 AM
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] how to get model scale?

 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?
best regards


[广告] 买房不必东奔西走,上房老大,看"二手房"网上房展会 <http://popme.163.com/link/003984_0909_8679.html> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080918/0c4183ac/attachment-0003.htm>

More information about the osg-users mailing list