QGIS API Documentation  2.99.0-Master (19b062c)
qgshillshadefilter.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgshillshadefilter.h - description
3  --------------------------------
4  begin : September 26th, 2011
5  copyright : (C) 2011 by Marco Hugentobler
6  email : marco dot hugentobler at sourcepole dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSHILLSHADEFILTER_H
19 #define QGSHILLSHADEFILTER_H
20 
21 #include "qgsderivativefilter.h"
22 #include "qgis_analysis.h"
23 
28 class ANALYSIS_EXPORT QgsHillshadeFilter: public QgsDerivativeFilter
29 {
30  public:
31  QgsHillshadeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat, double lightAzimuth = 300,
32  double lightAngle = 40 );
33 
37  float processNineCellWindow( float *x11, float *x21, float *x31,
38  float *x12, float *x22, float *x32,
39  float *x13, float *x23, float *x33 ) override;
40 
41  float lightAzimuth() const { return mLightAzimuth; }
42  void setLightAzimuth( float azimuth ) { mLightAzimuth = azimuth; }
43  float lightAngle() const { return mLightAngle; }
44  void setLightAngle( float angle ) { mLightAngle = angle; }
45 
46  private:
47  float mLightAzimuth;
48  float mLightAngle;
49 };
50 
51 #endif // QGSHILLSHADEFILTER_H
virtual float processNineCellWindow(float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33) override=0
Calculates output value from nine input values.
float lightAngle() const
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Definition: MathUtils.cpp:786
void setLightAzimuth(float azimuth)
float lightAzimuth() const
void setLightAngle(float angle)
Adds the ability to calculate derivatives in x- and y-directions.