Can you scale the world down?

classic Classic list List threaded Threaded
2 messages Options
Brett Brett
Reply | Threaded
Open this post in threaded view
|

Can you scale the world down?

Hi,

I wanted to scale the geometry of the world down, so I used the scale tag and tried a number less than one (.50) and it didn't have the effect I thought it would have. I thought the world would be reduced by 50%. Can you scale down as well as up? Does the scale tag only work on elevation geometry?

Thanks,
Brett
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: Can you scale the world down?

Hi Brett,

Are you tying to reduce the overall size of the globe (ie. the whole globe is 50% of it's original size)?  If so, just place an osg::MatrixTransform with scale parameters above the osgEarth node in the scene graph.  The vertical_scale parameter just scales elevation data (so a mountain that is 9000m tall would be 18000m tall if you set vertical_scale to 2.)

So something like this should work:
osg::MatrixTransform *mt = new osg::MatrixTransform;
mt->setMatrix(osg::Matrixd::scale(0.5,0.5,0.5);
mt->addChild(myEarthFile);
myMainSceneGraph->addChild(mt)

Thanks,

Jason

On Tue, Sep 15, 2009 at 8:36 AM, Brett (via Nabble) - No Reply <[hidden email]> wrote:
Hi,

I wanted to scale the geometry of the world down, so I used the scale tag and tried a number less than one (.50) and it didn't have the effect I thought it would have. I thought the world would be reduced by 50%. Can you scale down as well as up? Does the scale tag only work on elevation geometry?

Thanks,
Brett


View message @ http://n2.nabble.com/Can-you-scale-the-world-down-tp3648798p3648798.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.