0

center loaded obj

Anonymous 6 years ago 0
This discussion was imported from CodePlex

Kszyhu wrote at 2011-12-09 18:30:

Hi!

First of all - great work with Helix. Really good 3dViewPort!

But now question - is it possible, to "AutoFit" or "Center" object when loaded? When I load object (obj file) it shows "somewhere" in viewpost, and I have to scroll out until it shows :o Is it possible, to make it automaticly? like: Model3d.Camera.CenterToObject() or Model3dCamera.FitObjectToScreen()? 

Best wishes

Chris


objo wrote at 2011-12-09 18:44:

hi Chris, try the ZoomExtents() method on the HelixViewport3D. Or set ZoomExtentsWhenLoaded=true if the model was added before the view is loaded.

See all properties/methods of the control at http://helixtoolkit.codeplex.com/wikipage?title=HelixViewport3D


Kszyhu wrote at 2011-12-09 18:59:

:o ! It works! Solution was so close, but I was too lazy, to read all descriptions :P

Thx for help!