MCPcopy Create free account
hub / github.com/ange-yaghi/engine-sim / generate

Method generate

scripting/include/function_node.h:30–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 virtual Function *generate(EngineContext *context) {
31 Function *existingFunction = context->getFunction(this);
32 if (existingFunction != nullptr) {
33 return existingFunction;
34 }
35 else {
36 Function *function = new Function;
37 function->initialize((int)m_samples.size(), m_filterRadius);
38
39 for (const Sample &sample : m_samples) {
40 function->addSample(sample.x, sample.y);
41 }
42
43 context->addFunction(this, function);
44 return function;
45 }
46 }
47
48 protected:
49 virtual void registerInputs() {

Callers

nothing calls this directly

Calls 5

getFunctionMethod · 0.80
sizeMethod · 0.80
addFunctionMethod · 0.80
initializeMethod · 0.45
addSampleMethod · 0.45

Tested by

no test coverage detected