GLView icon indicating copy to clipboard operation
GLView copied to clipboard

How to scale the obj file automatically ?

Open LokeshBhatija opened this issue 10 years ago • 6 comments

currently I have to manually set the scale and translation properties. Is there any method to set them automatically? Could you tell me any references ?

LokeshBhatija avatar Dec 08 '14 13:12 LokeshBhatija

What do you mean by "automatically" - do you mean scale to fit the view?

nicklockwood avatar Dec 08 '14 13:12 nicklockwood

yes. Currently I have to manually create CATransform3DScale and CATransform3DMakeTranslation. Since, I am using models from the internet and I don't know how to find out the scaling factor of the models, is there any method to automatically scale the model to fit the view ?

LokeshBhatija avatar Dec 09 '14 07:12 LokeshBhatija

:+1:

elsurudo avatar Jun 08 '15 08:06 elsurudo

Hi Nick, Any update.

LokeshBhatija avatar Dec 09 '15 07:12 LokeshBhatija

@LokeshBhatija Did you ever get anywhere with this? Have the same need.

elsurudo avatar Jul 25 '16 08:07 elsurudo

Sorry, there's no way to do this in GLView currently. If you wanted to build such a thing, the best approach is probably to calculate the bounding box/sphere of the model and then scale so that it fills the view.

nicklockwood avatar Jul 25 '16 08:07 nicklockwood