Skip to content
Permalink
Browse files

Address review

  • Loading branch information
nirvn committed Nov 20, 2020
1 parent 9dee613 commit 1fe05fedcecbbf0fc56620b7621058e53b3caa48
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/3d/qgs3dmapscene.cpp
@@ -324,9 +324,9 @@ void Qgs3DMapScene::onCameraChanged()
if ( mMap.projectionType() == Qt3DRender::QCameraLens::OrthographicProjection )
{
QRect viewportRect( QPoint( 0, 0 ), mEngine->size() );
const float viewWidthFromCenter = mEngine->camera()->position().distanceToPoint( mEngine->camera()->viewCenter() );
const float viewWidthFromCenter = mCameraController->distance();
const float viewHeightFromCenter = viewportRect.height() * viewWidthFromCenter / viewportRect.width();
mEngine->camera()->lens()->setOrthographicProjection( -viewWidthFromCenter, viewWidthFromCenter, -viewHeightFromCenter, viewHeightFromCenter, 1.0f, 10000.0f );
mEngine->camera()->lens()->setOrthographicProjection( -viewWidthFromCenter, viewWidthFromCenter, -viewHeightFromCenter, viewHeightFromCenter, 10.0f, 10000.0f );
}

updateScene();

0 comments on commit 1fe05fe

Please sign in to comment.
You can’t perform that action at this time.