1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

Ground/ModelView: Center 3D models in the scene.

When a new 3D model is load, it will be centered on the scene.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1875 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
muralha 2010-10-04 11:56:50 +00:00 committed by muralha
parent 114956a514
commit a915ff5ff7

View File

@ -157,6 +157,8 @@ void ModelViewGadgetWidget::CreateScene()
QFile aircraft(acFilename);
m_World= GLC_Factory::instance()->createWorldFromFile(aircraft);
m_ModelBoundingBox= m_World.boundingBox();
m_GlView.reframe(m_ModelBoundingBox); // center 3d models in the scene
m_GlView.setDistMinAndMax(m_World.boundingBox());
loadError = false;
if (!mvInitGLSuccess)
initializeGL();