42 Terrain3x3(T dist,
const T* zvals=0);
48 T valueAt(T x,T y)
const;
51 T profileCurvature()
const;
52 T planformCurvature()
const;
55 T a0_, ax_,
ay_, axy_, ax2_, ay2_, ax2y_, ay2x_, ax2y2_;
75 ax2y2_ = ( v[4] + (v[2]+v[8]+v[0]+v[6])/4
76 - (v[5]+v[1]+v[7]+v[3])/4 ) / (
d2_*
d2_);
77 ay2x_ = ( (v[2]+v[8]-v[0]-v[6])/4 + (v[3]-v[5])/2 ) / (d2_*
d_);
78 ax2y_ = ( (v[8]+v[6]-v[2]-v[0])/4 + (v[1]-v[7])/2 ) / (d2_*d_);
79 ax2_ = ( (v[1]+v[7])/2 - v[4] ) / (
d2_);
80 ay2_ = ( (v[5]+v[3])/2 - v[4] ) / (
d2_);
81 axy_ = ( v[8]+v[0]-v[2]-v[6] ) / (4*d2_);
82 ax_ = ( v[7]-v[1] ) / (2*d_);
83 ay_ = ( v[5]-v[3] ) / (2*d_);
119 const T divby = ax2 + ay2;
120 return divby == 0 ?
mUdf(T)
130 const T divby = ax2 + ay2;
131 return divby == 0 ?
mUdf(T)
T ax2y2_
Definition: terrain3x3.h:55
T ax2y_
Definition: terrain3x3.h:55
T a0_
Definition: terrain3x3.h:55
float Atan2(float y, float x)
T valueAt(T x, T y) const
Definition: terrain3x3.h:89
T ay2_
Definition: terrain3x3.h:55
T axy_
Definition: terrain3x3.h:55
T ay2x_
Definition: terrain3x3.h:55
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270
Sets up a terrain polynomial for a 3x3 grid from 2D regularly sampled data.
Definition: terrain3x3.h:39
T direction() const
-pi < d < pi, or undef
Definition: terrain3x3.h:108
const T d_
Definition: terrain3x3.h:54
const T d2_
Definition: terrain3x3.h:54
T ay_
Definition: terrain3x3.h:55
T planformCurvature() const
curv perp to slope dir
Definition: terrain3x3.h:126
T ax_
Definition: terrain3x3.h:55
Terrain3x3(T dist, const T *zvals=0)
Definition: terrain3x3.h:61
T profileCurvature() const
curv in slope direction
Definition: terrain3x3.h:115
TrcKeyZSampling::Dir direction(TrcKeyZSampling::Dir slctype, int dimnr)
Definition: trckeyzsampling.h:129
#define mClass(module)
Definition: commondefs.h:161
void set(const T *)
Definition: terrain3x3.h:73
T slope() const
Definition: terrain3x3.h:101
T ax2_
Definition: terrain3x3.h:55