Skip to content
Permalink
Browse files

address reviews

  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Nov 6, 2020
1 parent 8768b7e commit e9ac7311c4da163859a3a5f7313fa0a541ab6022
@@ -418,6 +418,10 @@ Returns whether to display labels on terrain tiles
void setEyeDomeLightingEnabled( bool enabled );
%Docstring
Sets whether eye dome lighting will be used

.. seealso:: :py:func:`eyeDomeLightingEnabled`

.. versionadded:: 3.18
%End
bool eyeDomeLightingEnabled() const;
%Docstring
@@ -427,6 +431,10 @@ Returns whether eye dome lighting is used
void setEyeDomeLightingStrength( double strength );
%Docstring
Sets the eye dome lighting strength value

.. seealso:: :py:func:`eyeDomeLightingStrength`

.. versionadded:: 3.18
%End
double eyeDomeLightingStrength() const;
%Docstring
@@ -435,7 +443,11 @@ Returns the eye dome lighting strength value

void setEyeDomeLightingDistance( int distance );
%Docstring
Sets the eye dome lighting distance value (contributes to the contrast of the image)
Sets the eye dome lighting distance value (contributes to the contrast of the image

.. seealso:: :py:func:`eyeDomeLightingDistance`

.. versionadded:: 3.18
%End
int eyeDomeLightingDistance() const;
%Docstring
@@ -362,17 +362,29 @@ class _3D_EXPORT Qgs3DMapSettings : public QObject, public QgsTemporalRangeObjec
//! Returns whether to display labels on terrain tiles
bool showLabels() const { return mShowLabels; }

//! Sets whether eye dome lighting will be used
/**
* Sets whether eye dome lighting will be used
* \see eyeDomeLightingEnabled()
* \since QGIS 3.18
*/
void setEyeDomeLightingEnabled( bool enabled );
//! Returns whether eye dome lighting is used
bool eyeDomeLightingEnabled() const { return mEyeDomeLightingEnabled; }

//! Sets the eye dome lighting strength value
/**
* Sets the eye dome lighting strength value
* \see eyeDomeLightingStrength()
* \since QGIS 3.18
*/
void setEyeDomeLightingStrength( double strength );
//! Returns the eye dome lighting strength value
double eyeDomeLightingStrength() const { return mEyeDomeLightingStrength; }

//! Sets the eye dome lighting distance value (contributes to the contrast of the image)
/**
* Sets the eye dome lighting distance value (contributes to the contrast of the image
* \see eyeDomeLightingDistance()
* \since QGIS 3.18
*/
void setEyeDomeLightingDistance( int distance );
//! Returns the eye dome lighting distance value (contributes to the contrast of the image)
int eyeDomeLightingDistance() const { return mEyeDomeLightingDistance; }
@@ -630,7 +642,7 @@ class _3D_EXPORT Qgs3DMapSettings : public QObject, public QgsTemporalRangeObjec
QgsShadowSettings mShadowSettings; //!< Shadow rendering related settings

bool mEyeDomeLightingEnabled = false;
double mEyeDomeLightingStrength = 1000.0f;
double mEyeDomeLightingStrength = 1000.0;
int mEyeDomeLightingDistance = 1;
};

@@ -200,7 +200,7 @@ void QgsPostprocessingEntity::setEyeDomeLightingStrength( double strength )
mEyeDomeLightingStrengthParameter->setValue( QVariant::fromValue( strength ) );
}

void QgsPostprocessingEntity::setEyeDomeLightingDistance( double distance )
void QgsPostprocessingEntity::setEyeDomeLightingDistance( int distance )
{
mEyeDomeLightingDistanceParameter->setValue( QVariant::fromValue( distance ) );
}
@@ -53,7 +53,7 @@ class QgsPostprocessingEntity : public Qt3DCore::QEntity
//! Sets the eye dome lighting strength
void setEyeDomeLightingStrength( double strength );
//! Sets the eye dome lighting distance (contributes to the contrast of the image)
void setEyeDomeLightingDistance( double distance );
void setEyeDomeLightingDistance( int distance );
private:
Qt3DRender::QMaterial *mMaterial = nullptr;
Qt3DRender::QEffect *mEffect = nullptr;
@@ -343,7 +343,7 @@ void QgsShadowRenderingFrameGraph::setFrustumCullingEnabled( bool enabled )
mFrustumCulling->setParent( ( Qt3DCore::QNode * )nullptr );
}

void QgsShadowRenderingFrameGraph::setupEyeDomeLighting( bool enabled, double strength, double distance )
void QgsShadowRenderingFrameGraph::setupEyeDomeLighting( bool enabled, double strength, int distance )
{
mEyeDomeLightingEnabled = enabled;
mEyeDomeLightingStrength = strength;
@@ -117,7 +117,7 @@ class QgsShadowRenderingFrameGraph : public Qt3DCore::QEntity
//! Sets shadow rendering to use a directional light
void setupDirectionalLight( const QgsDirectionalLightSettings &light, float maximumShadowRenderingDistance );
//! Sets eye dome lighting shading related settings
void setupEyeDomeLighting( bool enabled, double strength, double distance );
void setupEyeDomeLighting( bool enabled, double strength, int distance );
private:
Qt3DRender::QRenderSurfaceSelector *mRenderSurfaceSelector = nullptr;
Qt3DRender::QViewport *mMainViewPort = nullptr;
@@ -156,8 +156,8 @@ class QgsShadowRenderingFrameGraph : public Qt3DCore::QEntity
int mShadowMapResolution = 2048;

bool mEyeDomeLightingEnabled = false;
double mEyeDomeLightingStrength = 1000.0f;
double mEyeDomeLightingDistance = 1.0f;
double mEyeDomeLightingStrength = 1000.0;
int mEyeDomeLightingDistance = 1;

Qt3DRender::QLayerFilter *mShadowSceneEntitiesFilter = nullptr;
Qt3DRender::QRenderStateSet *mShadowRenderStateSet = nullptr;
@@ -30,7 +30,7 @@ uniform float shadowBias;

uniform int edlEnabled;
uniform float edlStrength;
uniform float edlDistance;
uniform int edlDistance;

in vec2 texCoord;

0 comments on commit e9ac731

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