1 /** 2 Spotlight $(D Light), such as a reflector spotlight or a lantern. 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.spotlight; 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.light; 24 import godot.visualinstance; 25 import godot.spatial; 26 import godot.node; 27 /** 28 Spotlight $(D Light), such as a reflector spotlight or a lantern. 29 30 A SpotLight light is a type of $(D Light) node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of $(D Light). TODO: Image of a spotlight. 31 */ 32 @GodotBaseClass struct SpotLight 33 { 34 enum string _GODOT_internal_name = "SpotLight"; 35 public: 36 @nogc nothrow: 37 union { godot_object _godot_object; Light _GODOT_base; } 38 alias _GODOT_base this; 39 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 40 package(godot) __gshared bool _classBindingInitialized = false; 41 package(godot) static struct _classBinding 42 { 43 __gshared: 44 } 45 bool opEquals(in SpotLight other) const { return _godot_object.ptr is other._godot_object.ptr; } 46 SpotLight opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 47 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 48 mixin baseCasts; 49 static SpotLight _new() 50 { 51 static godot_class_constructor constructor; 52 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("SpotLight"); 53 if(constructor is null) return typeof(this).init; 54 return cast(SpotLight)(constructor()); 55 } 56 @disable new(size_t s); 57 /** 58 59 */ 60 @property double spotRange() 61 { 62 return getParam(3); 63 } 64 /// ditto 65 @property void spotRange(double v) 66 { 67 setParam(3, v); 68 } 69 /** 70 71 */ 72 @property double spotAttenuation() 73 { 74 return getParam(4); 75 } 76 /// ditto 77 @property void spotAttenuation(double v) 78 { 79 setParam(4, v); 80 } 81 /** 82 83 */ 84 @property double spotAngle() 85 { 86 return getParam(5); 87 } 88 /// ditto 89 @property void spotAngle(double v) 90 { 91 setParam(5, v); 92 } 93 /** 94 95 */ 96 @property double spotAngleAttenuation() 97 { 98 return getParam(6); 99 } 100 /// ditto 101 @property void spotAngleAttenuation(double v) 102 { 103 setParam(6, v); 104 } 105 }