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.giprobe; 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.visualinstance; 24 import godot.giprobedata; 25 import godot.spatial; 26 import godot.node; 27 /** 28 29 */ 30 @GodotBaseClass struct GIProbe 31 { 32 enum string _GODOT_internal_name = "GIProbe"; 33 public: 34 @nogc nothrow: 35 union { godot_object _godot_object; VisualInstance _GODOT_base; } 36 alias _GODOT_base this; 37 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 38 package(godot) __gshared bool _classBindingInitialized = false; 39 package(godot) static struct _classBinding 40 { 41 __gshared: 42 @GodotName("set_probe_data") GodotMethod!(void, GIProbeData) setProbeData; 43 @GodotName("get_probe_data") GodotMethod!(GIProbeData) getProbeData; 44 @GodotName("set_subdiv") GodotMethod!(void, long) setSubdiv; 45 @GodotName("get_subdiv") GodotMethod!(GIProbe.Subdiv) getSubdiv; 46 @GodotName("set_extents") GodotMethod!(void, Vector3) setExtents; 47 @GodotName("get_extents") GodotMethod!(Vector3) getExtents; 48 @GodotName("set_dynamic_range") GodotMethod!(void, long) setDynamicRange; 49 @GodotName("get_dynamic_range") GodotMethod!(long) getDynamicRange; 50 @GodotName("set_energy") GodotMethod!(void, double) setEnergy; 51 @GodotName("get_energy") GodotMethod!(double) getEnergy; 52 @GodotName("set_bias") GodotMethod!(void, double) setBias; 53 @GodotName("get_bias") GodotMethod!(double) getBias; 54 @GodotName("set_normal_bias") GodotMethod!(void, double) setNormalBias; 55 @GodotName("get_normal_bias") GodotMethod!(double) getNormalBias; 56 @GodotName("set_propagation") GodotMethod!(void, double) setPropagation; 57 @GodotName("get_propagation") GodotMethod!(double) getPropagation; 58 @GodotName("set_interior") GodotMethod!(void, bool) setInterior; 59 @GodotName("is_interior") GodotMethod!(bool) isInterior; 60 @GodotName("set_compress") GodotMethod!(void, bool) setCompress; 61 @GodotName("is_compressed") GodotMethod!(bool) isCompressed; 62 @GodotName("bake") GodotMethod!(void, GodotObject, bool) bake; 63 @GodotName("debug_bake") GodotMethod!(void) debugBake; 64 } 65 bool opEquals(in GIProbe other) const { return _godot_object.ptr is other._godot_object.ptr; } 66 GIProbe opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 67 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 68 mixin baseCasts; 69 static GIProbe _new() 70 { 71 static godot_class_constructor constructor; 72 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("GIProbe"); 73 if(constructor is null) return typeof(this).init; 74 return cast(GIProbe)(constructor()); 75 } 76 @disable new(size_t s); 77 /// 78 enum Subdiv : int 79 { 80 /** 81 82 */ 83 subdiv64 = 0, 84 /** 85 86 */ 87 subdiv128 = 1, 88 /** 89 90 */ 91 subdiv256 = 2, 92 /** 93 94 */ 95 subdiv512 = 3, 96 /** 97 98 */ 99 subdivMax = 4, 100 } 101 /// 102 enum Constants : int 103 { 104 subdiv64 = 0, 105 subdiv128 = 1, 106 subdiv256 = 2, 107 subdiv512 = 3, 108 subdivMax = 4, 109 } 110 /** 111 112 */ 113 void setProbeData(GIProbeData data) 114 { 115 checkClassBinding!(typeof(this))(); 116 ptrcall!(void)(_classBinding.setProbeData, _godot_object, data); 117 } 118 /** 119 120 */ 121 Ref!GIProbeData getProbeData() const 122 { 123 checkClassBinding!(typeof(this))(); 124 return ptrcall!(GIProbeData)(_classBinding.getProbeData, _godot_object); 125 } 126 /** 127 128 */ 129 void setSubdiv(in long subdiv) 130 { 131 checkClassBinding!(typeof(this))(); 132 ptrcall!(void)(_classBinding.setSubdiv, _godot_object, subdiv); 133 } 134 /** 135 136 */ 137 GIProbe.Subdiv getSubdiv() const 138 { 139 checkClassBinding!(typeof(this))(); 140 return ptrcall!(GIProbe.Subdiv)(_classBinding.getSubdiv, _godot_object); 141 } 142 /** 143 144 */ 145 void setExtents(in Vector3 extents) 146 { 147 checkClassBinding!(typeof(this))(); 148 ptrcall!(void)(_classBinding.setExtents, _godot_object, extents); 149 } 150 /** 151 152 */ 153 Vector3 getExtents() const 154 { 155 checkClassBinding!(typeof(this))(); 156 return ptrcall!(Vector3)(_classBinding.getExtents, _godot_object); 157 } 158 /** 159 160 */ 161 void setDynamicRange(in long max) 162 { 163 checkClassBinding!(typeof(this))(); 164 ptrcall!(void)(_classBinding.setDynamicRange, _godot_object, max); 165 } 166 /** 167 168 */ 169 long getDynamicRange() const 170 { 171 checkClassBinding!(typeof(this))(); 172 return ptrcall!(long)(_classBinding.getDynamicRange, _godot_object); 173 } 174 /** 175 176 */ 177 void setEnergy(in double max) 178 { 179 checkClassBinding!(typeof(this))(); 180 ptrcall!(void)(_classBinding.setEnergy, _godot_object, max); 181 } 182 /** 183 184 */ 185 double getEnergy() const 186 { 187 checkClassBinding!(typeof(this))(); 188 return ptrcall!(double)(_classBinding.getEnergy, _godot_object); 189 } 190 /** 191 192 */ 193 void setBias(in double max) 194 { 195 checkClassBinding!(typeof(this))(); 196 ptrcall!(void)(_classBinding.setBias, _godot_object, max); 197 } 198 /** 199 200 */ 201 double getBias() const 202 { 203 checkClassBinding!(typeof(this))(); 204 return ptrcall!(double)(_classBinding.getBias, _godot_object); 205 } 206 /** 207 208 */ 209 void setNormalBias(in double max) 210 { 211 checkClassBinding!(typeof(this))(); 212 ptrcall!(void)(_classBinding.setNormalBias, _godot_object, max); 213 } 214 /** 215 216 */ 217 double getNormalBias() const 218 { 219 checkClassBinding!(typeof(this))(); 220 return ptrcall!(double)(_classBinding.getNormalBias, _godot_object); 221 } 222 /** 223 224 */ 225 void setPropagation(in double max) 226 { 227 checkClassBinding!(typeof(this))(); 228 ptrcall!(void)(_classBinding.setPropagation, _godot_object, max); 229 } 230 /** 231 232 */ 233 double getPropagation() const 234 { 235 checkClassBinding!(typeof(this))(); 236 return ptrcall!(double)(_classBinding.getPropagation, _godot_object); 237 } 238 /** 239 240 */ 241 void setInterior(in bool enable) 242 { 243 checkClassBinding!(typeof(this))(); 244 ptrcall!(void)(_classBinding.setInterior, _godot_object, enable); 245 } 246 /** 247 248 */ 249 bool isInterior() const 250 { 251 checkClassBinding!(typeof(this))(); 252 return ptrcall!(bool)(_classBinding.isInterior, _godot_object); 253 } 254 /** 255 256 */ 257 void setCompress(in bool enable) 258 { 259 checkClassBinding!(typeof(this))(); 260 ptrcall!(void)(_classBinding.setCompress, _godot_object, enable); 261 } 262 /** 263 264 */ 265 bool isCompressed() const 266 { 267 checkClassBinding!(typeof(this))(); 268 return ptrcall!(bool)(_classBinding.isCompressed, _godot_object); 269 } 270 /** 271 272 */ 273 void bake(GodotObject from_node = GodotObject.init, in bool create_visual_debug = false) 274 { 275 checkClassBinding!(typeof(this))(); 276 ptrcall!(void)(_classBinding.bake, _godot_object, from_node, create_visual_debug); 277 } 278 /** 279 280 */ 281 void debugBake() 282 { 283 checkClassBinding!(typeof(this))(); 284 ptrcall!(void)(_classBinding.debugBake, _godot_object); 285 } 286 /** 287 288 */ 289 @property GIProbe.Subdiv subdiv() 290 { 291 return getSubdiv(); 292 } 293 /// ditto 294 @property void subdiv(long v) 295 { 296 setSubdiv(v); 297 } 298 /** 299 300 */ 301 @property Vector3 extents() 302 { 303 return getExtents(); 304 } 305 /// ditto 306 @property void extents(Vector3 v) 307 { 308 setExtents(v); 309 } 310 /** 311 312 */ 313 @property long dynamicRange() 314 { 315 return getDynamicRange(); 316 } 317 /// ditto 318 @property void dynamicRange(long v) 319 { 320 setDynamicRange(v); 321 } 322 /** 323 324 */ 325 @property double energy() 326 { 327 return getEnergy(); 328 } 329 /// ditto 330 @property void energy(double v) 331 { 332 setEnergy(v); 333 } 334 /** 335 336 */ 337 @property double propagation() 338 { 339 return getPropagation(); 340 } 341 /// ditto 342 @property void propagation(double v) 343 { 344 setPropagation(v); 345 } 346 /** 347 348 */ 349 @property double bias() 350 { 351 return getBias(); 352 } 353 /// ditto 354 @property void bias(double v) 355 { 356 setBias(v); 357 } 358 /** 359 360 */ 361 @property double normalBias() 362 { 363 return getNormalBias(); 364 } 365 /// ditto 366 @property void normalBias(double v) 367 { 368 setNormalBias(v); 369 } 370 /** 371 372 */ 373 @property bool interior() 374 { 375 return isInterior(); 376 } 377 /// ditto 378 @property void interior(bool v) 379 { 380 setInterior(v); 381 } 382 /** 383 384 */ 385 @property bool compress() 386 { 387 return isCompressed(); 388 } 389 /// ditto 390 @property void compress(bool v) 391 { 392 setCompress(v); 393 } 394 /** 395 396 */ 397 @property GIProbeData data() 398 { 399 return getProbeData(); 400 } 401 /// ditto 402 @property void data(GIProbeData v) 403 { 404 setProbeData(v); 405 } 406 }