QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 
26 class ANALYSIS_EXPORT QgsHillshadeFilter: public QgsDerivativeFilter
27 {
28  public:
29  QgsHillshadeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, double lightAzimuth = 300,
30  double lightAngle = 40 );
32 
35  float processNineCellWindow( float* x11, float* x21, float* x31,
36  float* x12, float* x22, float* x32,
37  float* x13, float* x23, float* x33 ) override;
38 
39  float lightAzimuth() const { return mLightAzimuth; }
40  void setLightAzimuth( float azimuth ) { mLightAzimuth = azimuth; }
41  float lightAngle() const { return mLightAngle; }
42  void setLightAngle( float angle ) { mLightAngle = angle; }
43 
44  private:
45  float mLightAzimuth;
46  float mLightAngle;
47 };
48 
49 #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
void setLightAzimuth(float azimuth)
float lightAzimuth() const
void setLightAngle(float angle)
double ANALYSIS_EXPORT angle(Point3D *p1, Point3D *p2, Point3D *p3, Point3D *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Adds the ability to calculate derivatives in x- and y-directions.