TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ Evaluate()

NodeOutput SubNode::Evaluate ( NodeInputParam  input,
NodeEditorPin pin 
)
virtual

Implements NodeEditorNode.

Definition at line 9 of file SubNode.cpp.

10{
11 float diff = 0;
12
13 if (inputPins[0]->IsLinked())
14 {
15 diff += inputPins[0]->other->Evaluate(input).value;
16 }
17
18 else
19 {
20 diff += value1;
21 }
22
23 if (inputPins[1]->IsLinked())
24 {
25 diff -= inputPins[1]->other->Evaluate(input).value;
26 }
27
28 else
29 {
30 diff -= value2;
31 }
32
33 return NodeOutput({ diff });
34}