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:
parent
114956a514
commit
a915ff5ff7
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user