TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ Load()

void CurveNode::Load ( nlohmann::json  data)
virtual

Implements NodeEditorNode.

Definition at line 59 of file CurveNode.cpp.

60{
61 maxPoints = data["maxPoints"];
62 ReserveVector(curve, (maxPoints > data["curveSize"].get<int>() ? maxPoints : data["curveSize"].get<int>()));
63
64 for (nlohmann::json tmp : data["curve"])
65 {
66 curve[tmp["index"]] = ImVec2(tmp["x"], tmp["y"]);
67 }
68
69 axis = data["axis"];
70}
a class to store JSON values
Definition: json.hpp:17860