1 /**
2 Omnidirectional light, such as a light bulb or a candle.
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.omnilight;
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 Omnidirectional light, such as a light bulb or a candle.
29 
30 An Omnidirectional light is a type of $(D Light) that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters.
31 */
32 @GodotBaseClass struct OmniLight
33 {
34 	enum string _GODOT_internal_name = "OmniLight";
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 		@GodotName("set_shadow_mode") GodotMethod!(void, long) setShadowMode;
45 		@GodotName("get_shadow_mode") GodotMethod!(OmniLight.ShadowMode) getShadowMode;
46 		@GodotName("set_shadow_detail") GodotMethod!(void, long) setShadowDetail;
47 		@GodotName("get_shadow_detail") GodotMethod!(OmniLight.ShadowDetail) getShadowDetail;
48 	}
49 	bool opEquals(in OmniLight other) const { return _godot_object.ptr is other._godot_object.ptr; }
50 	OmniLight opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
51 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
52 	mixin baseCasts;
53 	static OmniLight _new()
54 	{
55 		static godot_class_constructor constructor;
56 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("OmniLight");
57 		if(constructor is null) return typeof(this).init;
58 		return cast(OmniLight)(constructor());
59 	}
60 	@disable new(size_t s);
61 	/// 
62 	enum ShadowMode : int
63 	{
64 		/**
65 		
66 		*/
67 		shadowDualParaboloid = 0,
68 		/**
69 		
70 		*/
71 		shadowCube = 1,
72 	}
73 	/// 
74 	enum ShadowDetail : int
75 	{
76 		/**
77 		
78 		*/
79 		shadowDetailVertical = 0,
80 		/**
81 		
82 		*/
83 		shadowDetailHorizontal = 1,
84 	}
85 	/// 
86 	enum Constants : int
87 	{
88 		shadowDetailVertical = 0,
89 		shadowDualParaboloid = 0,
90 		shadowCube = 1,
91 		shadowDetailHorizontal = 1,
92 	}
93 	/**
94 	
95 	*/
96 	void setShadowMode(in long mode)
97 	{
98 		checkClassBinding!(typeof(this))();
99 		ptrcall!(void)(_classBinding.setShadowMode, _godot_object, mode);
100 	}
101 	/**
102 	
103 	*/
104 	OmniLight.ShadowMode getShadowMode() const
105 	{
106 		checkClassBinding!(typeof(this))();
107 		return ptrcall!(OmniLight.ShadowMode)(_classBinding.getShadowMode, _godot_object);
108 	}
109 	/**
110 	
111 	*/
112 	void setShadowDetail(in long detail)
113 	{
114 		checkClassBinding!(typeof(this))();
115 		ptrcall!(void)(_classBinding.setShadowDetail, _godot_object, detail);
116 	}
117 	/**
118 	
119 	*/
120 	OmniLight.ShadowDetail getShadowDetail() const
121 	{
122 		checkClassBinding!(typeof(this))();
123 		return ptrcall!(OmniLight.ShadowDetail)(_classBinding.getShadowDetail, _godot_object);
124 	}
125 	/**
126 	Maximum distance the light affects.
127 	*/
128 	@property double omniRange()
129 	{
130 		return getParam(3);
131 	}
132 	/// ditto
133 	@property void omniRange(double v)
134 	{
135 		setParam(3, v);
136 	}
137 	/**
138 	The light's attenuation (drop-off) curve. A number of presets are available in the Inspector.
139 	*/
140 	@property double omniAttenuation()
141 	{
142 		return getParam(4);
143 	}
144 	/// ditto
145 	@property void omniAttenuation(double v)
146 	{
147 		setParam(4, v);
148 	}
149 	/**
150 	See $(D shadowmode).
151 	*/
152 	@property OmniLight.ShadowMode omniShadowMode()
153 	{
154 		return getShadowMode();
155 	}
156 	/// ditto
157 	@property void omniShadowMode(long v)
158 	{
159 		setShadowMode(v);
160 	}
161 	/**
162 	See $(D shadowdetail).
163 	*/
164 	@property OmniLight.ShadowDetail omniShadowDetail()
165 	{
166 		return getShadowDetail();
167 	}
168 	/// ditto
169 	@property void omniShadowDetail(long v)
170 	{
171 		setShadowDetail(v);
172 	}
173 }