1 /** 2 3 4 Copyright: 5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. 6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) 7 Copyright (c) 2017-2018 Godot-D contributors 8 9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License) 10 11 12 */ 13 module godot.visualshadernodescalarfunc; 14 import std.meta : AliasSeq, staticIndexOf; 15 import std.traits : Unqual; 16 import godot.d.meta; 17 import godot.core; 18 import godot.c; 19 import godot.d.bind; 20 import godot.d.reference; 21 import godot.object; 22 import godot.classdb; 23 import godot.visualshadernode; 24 import godot.resource; 25 import godot.reference; 26 /** 27 28 */ 29 @GodotBaseClass struct VisualShaderNodeScalarFunc 30 { 31 enum string _GODOT_internal_name = "VisualShaderNodeScalarFunc"; 32 public: 33 @nogc nothrow: 34 union { godot_object _godot_object; VisualShaderNode _GODOT_base; } 35 alias _GODOT_base this; 36 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 37 package(godot) __gshared bool _classBindingInitialized = false; 38 package(godot) static struct _classBinding 39 { 40 __gshared: 41 @GodotName("set_function") GodotMethod!(void, long) setFunction; 42 @GodotName("get_function") GodotMethod!(VisualShaderNodeScalarFunc.Function) getFunction; 43 } 44 bool opEquals(in VisualShaderNodeScalarFunc other) const { return _godot_object.ptr is other._godot_object.ptr; } 45 VisualShaderNodeScalarFunc opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 46 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 47 mixin baseCasts; 48 static VisualShaderNodeScalarFunc _new() 49 { 50 static godot_class_constructor constructor; 51 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualShaderNodeScalarFunc"); 52 if(constructor is null) return typeof(this).init; 53 return cast(VisualShaderNodeScalarFunc)(constructor()); 54 } 55 @disable new(size_t s); 56 /// 57 enum Function : int 58 { 59 /** 60 61 */ 62 funcSin = 0, 63 /** 64 65 */ 66 funcCos = 1, 67 /** 68 69 */ 70 funcTan = 2, 71 /** 72 73 */ 74 funcAsin = 3, 75 /** 76 77 */ 78 funcAcos = 4, 79 /** 80 81 */ 82 funcAtan = 5, 83 /** 84 85 */ 86 funcSinh = 6, 87 /** 88 89 */ 90 funcCosh = 7, 91 /** 92 93 */ 94 funcTanh = 8, 95 /** 96 97 */ 98 funcLog = 9, 99 /** 100 101 */ 102 funcExp = 10, 103 /** 104 105 */ 106 funcSqrt = 11, 107 /** 108 109 */ 110 funcAbs = 12, 111 /** 112 113 */ 114 funcSign = 13, 115 /** 116 117 */ 118 funcFloor = 14, 119 /** 120 121 */ 122 funcRound = 15, 123 /** 124 125 */ 126 funcCeil = 16, 127 /** 128 129 */ 130 funcFrac = 17, 131 /** 132 133 */ 134 funcSaturate = 18, 135 /** 136 137 */ 138 funcNegate = 19, 139 } 140 /// 141 enum Constants : int 142 { 143 funcSin = 0, 144 funcCos = 1, 145 funcTan = 2, 146 funcAsin = 3, 147 funcAcos = 4, 148 funcAtan = 5, 149 funcSinh = 6, 150 funcCosh = 7, 151 funcTanh = 8, 152 funcLog = 9, 153 funcExp = 10, 154 funcSqrt = 11, 155 funcAbs = 12, 156 funcSign = 13, 157 funcFloor = 14, 158 funcRound = 15, 159 funcCeil = 16, 160 funcFrac = 17, 161 funcSaturate = 18, 162 funcNegate = 19, 163 } 164 /** 165 166 */ 167 void setFunction(in long func) 168 { 169 checkClassBinding!(typeof(this))(); 170 ptrcall!(void)(_classBinding.setFunction, _godot_object, func); 171 } 172 /** 173 174 */ 175 VisualShaderNodeScalarFunc.Function getFunction() const 176 { 177 checkClassBinding!(typeof(this))(); 178 return ptrcall!(VisualShaderNodeScalarFunc.Function)(_classBinding.getFunction, _godot_object); 179 } 180 /** 181 182 */ 183 @property VisualShaderNodeScalarFunc.Function _function() 184 { 185 return getFunction(); 186 } 187 /// ditto 188 @property void _function(long v) 189 { 190 setFunction(v); 191 } 192 }