14{
15 float xC, yC, hC;
16
17 if (inputPins[0]->IsLinked())
18 {
19 xC = inputPins[0]->other->Evaluate(input).value;
20 }
21
22 else
23 {
24 xC = pos[0];
25 }
26
27 if (inputPins[1]->IsLinked())
28 {
29 yC = inputPins[1]->other->Evaluate(input).value;
30 }
31
32 else
33 {
34 yC = pos[1];
35 }
36
37 if (inputPins[2]->IsLinked())
38 {
39 hC = inputPins[2]->other->Evaluate(input).value;
40 }
41
42 else
43 {
44 hC = height;
45 }
46
47 float xN = input.x / input.maxX;
48 float yN = input.z / input.maxZ;
49 xN = xN * 2 - 1;
50 yN = yN * 2 - 1;
51 float h = 1 - (SQUARE((yN - yC) / radius) + SQUARE((xN - xC) / radius));
52 h *= pow(2.71828, -p * (SQUARE(xN - xC) + SQUARE(yN - yC)));
54}