TerraForge3D
2.3.1
3D Terrain And Landscape Generator
◆
Evaluate()
NodeOutput
MathFunctionNode::Evaluate
(
NodeInputParam
input
,
NodeEditorPin
*
pin
)
virtual
Implements
NodeEditorNode
.
Definition at line
18
of file
MathFunctionNode.cpp
.
19
{
20
try
21
{
22
if
(input.maxZ == 0)
23
{
24
input.maxZ = 1;
25
}
26
27
x = (input.x / input.maxX) * 2 - 1;
28
y = (input.y / input.maxY) * 2 - 1;
29
z = (input.z / input.maxZ) * 2 - 1;
30
return
NodeOutput
({(float)parser->Eval() * factor});
31
}
32
33
catch
(...)
34
{
35
}
36
37
return
NodeOutput
({0.0f});
38
}
NodeOutput
Definition:
NodeEditor.h:26
MathFunctionNode
Generated on Thu Apr 7 2022 14:10:52 for TerraForge3D by
1.9.3