1 /* 2 Inochi2D Composite Node 3 4 Copyright © 2022, Inochi2D Project 5 Distributed under the 2-Clause BSD License, see LICENSE file. 6 7 Authors: Asahi Lina 8 */ 9 module inochi2d.core.nodes.drivers; 10 import inochi2d.core.nodes.common; 11 //import inochi2d.core.nodes; 12 import inochi2d.core; 13 public import inochi2d.core.nodes.drivers.simplephysics; 14 15 /** 16 Driver abstract node type 17 */ 18 @TypeId("Driver") 19 abstract class Driver : Node { 20 private: 21 this() { } 22 23 protected: 24 /** 25 Constructs a new Driver node 26 */ 27 this(uint uuid, Node parent = null) { 28 super(uuid, parent); 29 } 30 31 public: 32 override 33 void beginUpdate() { 34 super.beginUpdate(); 35 } 36 37 override 38 void update() { 39 super.update(); 40 } 41 42 Parameter[] getAffectedParameters() { 43 return []; 44 } 45 46 final 47 bool affectsParameter(ref Parameter param) { 48 foreach(ref Parameter p; getAffectedParameters()) { 49 if (p.uuid == param.uuid) return true; 50 } 51 return false; 52 } 53 54 abstract void updateDriver(); 55 56 abstract void reset(); 57 58 void drawDebug() { 59 } 60 }