Skip to content
Permalink
Browse files

relocated qgsdirectionallightsettings.h header guards and fixed a typo

  • Loading branch information
NEDJIMAbelgacem authored and nyalldawson committed Jun 10, 2020
1 parent d1ed0cc commit 73209b38a54e1e37c4f1124736bb69f843f49136
Showing with 6 additions and 6 deletions.
  1. +4 −4 src/3d/qgs3dmapscene.cpp
  2. +2 −2 src/3d/qgsdirectionallightsettings.h
@@ -478,15 +478,15 @@ void Qgs3DMapScene::updateLights()
}

const auto newDirectionalLights = mMap.directionalLights();
for ( const QgsDirectionalLightSettings &pointLightSettings : newDirectionalLights )
for ( const QgsDirectionalLightSettings &directionalLightSettings : newDirectionalLights )
{
Qt3DCore::QEntity *lightEntity = new Qt3DCore::QEntity;
Qt3DCore::QTransform *lightTransform = new Qt3DCore::QTransform;

Qt3DRender::QDirectionalLight *light = new Qt3DRender::QDirectionalLight;
light->setColor( pointLightSettings.color() );
light->setIntensity( pointLightSettings.intensity() );
QgsVector3D direction = pointLightSettings.direction();
light->setColor( directionalLightSettings.color() );
light->setIntensity( directionalLightSettings.intensity() );
QgsVector3D direction = directionalLightSettings.direction();
light->setWorldDirection( QVector3D( direction.x(), direction.y(), direction.z() ) );

lightEntity->addComponent( light );
@@ -1,5 +1,3 @@
#ifndef QGSDIRECTIONALLIGHTSETTINGS_H
#define QGSDIRECTIONALLIGHTSETTINGS_H
/***************************************************************************
qgsdirectionallightsettings.h
--------------------------------------
@@ -15,6 +13,8 @@
* *
***************************************************************************/

#ifndef QGSDIRECTIONALLIGHTSETTINGS_H
#define QGSDIRECTIONALLIGHTSETTINGS_H
#include "qgis_3d.h"

#include "qgsvector3d.h"

0 comments on commit 73209b3

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