TerraForge3D
2.3.1
3D Terrain And Landscape Generator
◆
Evaluate()
NodeOutput
CurveNode::Evaluate
(
NodeInputParam
input
,
NodeEditorPin
*
pin
)
virtual
Implements
NodeEditorNode
.
Definition at line
24
of file
CurveNode.cpp
.
25
{
26
float
result = 0;
27
float
axisVal = 0;
28
float
axisMax = 0;
29
30
switch
(axis)
31
{
32
case
0 :
33
axisVal = input.x;
34
axisMax = input.maxX;
35
break
;
36
37
case
1:
38
axisVal = input.y;
39
axisMax = input.maxY;
40
break
;
41
42
case
2:
43
axisVal = input.z;
44
axisMax = input.maxZ;
45
break
;
46
47
default
:
48
break
;
49
}
50
51
if
(axisMax == 0)
52
{
53
axisMax = 1;
54
}
55
56
return
NodeOutput
({ ImGui::CurveValueSmooth((axisVal/axisMax), maxPoints, curve.data()) });
57
}
NodeOutput
Definition:
NodeEditor.h:26
CurveNode
Generated on Thu Apr 7 2022 14:10:51 for TerraForge3D by
1.9.3