hi - how does scale work - is it a percentage or an absolute value - for instance if i have a 64x64x64 cube and want to make it 512x512x512 do i make the scale call as:
node->setScale(core::vector3df(4.0,4.0,4.0));
or
node->setScale(core::vector3df(512.0,512.0,512.0));
if its the first option i hope there is a way to get the exact bounding box of the object so i can calculate how to get from 64 to 512 - i had this problem in Ogre where they pad the bounding box for every object so there is no way to get a somewhat accurate size estimate on a model ...
Scale question
-
DarkWhoppy
- Posts: 386
- Joined: Thu Sep 25, 2003 12:43 pm
- Contact:
Yes it is percentage. And to get exact scaling do something like:
In the case of 512 and 64, this is just 8.0f (64*8=512). For other numbers, it may work out to a non-round number and this method will always give as-close-to exact as you can get.
Code: Select all
node->setScale(irr::core::vector3df(512.0f/64.0f,512.0f/64.0f,512.0f/64.0f));