TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ OnRender()

void ClampNode::OnRender ( )
virtual

Implements NodeEditorNode.

Definition at line 65 of file ClampNode.cpp.

66{
67 DrawHeader("Clamp");
68 inputPins[0]->Render();
69 ImGui::Text("Input");
70
71 if (!inputPins[0]->IsLinked())
72 {
73 ImGui::PushItemWidth(100);
74 ImGui::DragFloat(("##" + std::to_string(inputPins[0]->id)).c_str(), &inpt, 0.01f);
75 ImGui::PopItemWidth();
76 }
77
78 ImGui::SameLine();
79 ImGui::Text("Out");
80 outputPins[0]->Render();
81 inputPins[1]->Render();
82 ImGui::Text("Minimum");
83
84 if (!inputPins[1]->IsLinked())
85 {
86 ImGui::PushItemWidth(100);
87 ImGui::DragFloat(("##" + std::to_string(inputPins[1]->id)).c_str(), &minV, 0.01f);
88 ImGui::PopItemWidth();
89 }
90
91 inputPins[2]->Render();
92 ImGui::Text("Maximum");
93
94 if (!inputPins[2]->IsLinked())
95 {
96 ImGui::PushItemWidth(100);
97 ImGui::DragFloat(("##" + std::to_string(inputPins[2]->id)).c_str(), &maxV, 0.01f);
98 ImGui::PopItemWidth();
99 }
100
101 ImGui::NewLine();
102}