How to reset the view transforms
![]() 9/11/2015 8:23 PM
|
---|
Following along with one of the OpenGL examples I have a small viewer that displays my model and allows rotation/pan etc. Now I want to implement a "Reset View" function so user can reset everything back to the original view when opening ( ie after they've rotated,zoomed and panned into oblivion). I do it as follows: public void ViewReset() BoundsCalculator boundsCalculator = new BoundsCalculator(_modelbounds); // the following reset triggers event to CalculateModelViewAndProjection It almost works - rotation and positioning are restored. The remaining issue is that the "zoom" factor is not restored. Is there a better/recommended way to do this? Thanks |
![]() 9/15/2015 8:27 PM
|
---|
Issue resolved: Need to set transformProvider.ViewScaling back to 1.0 before resetting transforms. |