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.bakedlightmapdata;
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.resource;
24 import godot.texture;
25 import godot.reference;
26 /**
27 
28 */
29 @GodotBaseClass struct BakedLightmapData
30 {
31 	enum string _GODOT_internal_name = "BakedLightmapData";
32 public:
33 @nogc nothrow:
34 	union { godot_object _godot_object; Resource _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_user_data") GodotMethod!(void, Array) _setUserData;
42 		@GodotName("_get_user_data") GodotMethod!(Array) _getUserData;
43 		@GodotName("set_bounds") GodotMethod!(void, AABB) setBounds;
44 		@GodotName("get_bounds") GodotMethod!(AABB) getBounds;
45 		@GodotName("set_cell_space_transform") GodotMethod!(void, Transform) setCellSpaceTransform;
46 		@GodotName("get_cell_space_transform") GodotMethod!(Transform) getCellSpaceTransform;
47 		@GodotName("set_cell_subdiv") GodotMethod!(void, long) setCellSubdiv;
48 		@GodotName("get_cell_subdiv") GodotMethod!(long) getCellSubdiv;
49 		@GodotName("set_octree") GodotMethod!(void, PoolByteArray) setOctree;
50 		@GodotName("get_octree") GodotMethod!(PoolByteArray) getOctree;
51 		@GodotName("set_energy") GodotMethod!(void, double) setEnergy;
52 		@GodotName("get_energy") GodotMethod!(double) getEnergy;
53 		@GodotName("add_user") GodotMethod!(void, NodePath, Texture, long) addUser;
54 		@GodotName("get_user_count") GodotMethod!(long) getUserCount;
55 		@GodotName("get_user_path") GodotMethod!(NodePath, long) getUserPath;
56 		@GodotName("get_user_lightmap") GodotMethod!(Texture, long) getUserLightmap;
57 		@GodotName("clear_users") GodotMethod!(void) clearUsers;
58 	}
59 	bool opEquals(in BakedLightmapData other) const { return _godot_object.ptr is other._godot_object.ptr; }
60 	BakedLightmapData opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
61 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
62 	mixin baseCasts;
63 	static BakedLightmapData _new()
64 	{
65 		static godot_class_constructor constructor;
66 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("BakedLightmapData");
67 		if(constructor is null) return typeof(this).init;
68 		return cast(BakedLightmapData)(constructor());
69 	}
70 	@disable new(size_t s);
71 	/**
72 	
73 	*/
74 	void _setUserData(in Array data)
75 	{
76 		Array _GODOT_args = Array.empty_array;
77 		_GODOT_args.append(data);
78 		String _GODOT_method_name = String("_set_user_data");
79 		this.callv(_GODOT_method_name, _GODOT_args);
80 	}
81 	/**
82 	
83 	*/
84 	Array _getUserData() const
85 	{
86 		Array _GODOT_args = Array.empty_array;
87 		String _GODOT_method_name = String("_get_user_data");
88 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!Array);
89 	}
90 	/**
91 	
92 	*/
93 	void setBounds(in AABB bounds)
94 	{
95 		checkClassBinding!(typeof(this))();
96 		ptrcall!(void)(_classBinding.setBounds, _godot_object, bounds);
97 	}
98 	/**
99 	
100 	*/
101 	AABB getBounds() const
102 	{
103 		checkClassBinding!(typeof(this))();
104 		return ptrcall!(AABB)(_classBinding.getBounds, _godot_object);
105 	}
106 	/**
107 	
108 	*/
109 	void setCellSpaceTransform(in Transform xform)
110 	{
111 		checkClassBinding!(typeof(this))();
112 		ptrcall!(void)(_classBinding.setCellSpaceTransform, _godot_object, xform);
113 	}
114 	/**
115 	
116 	*/
117 	Transform getCellSpaceTransform() const
118 	{
119 		checkClassBinding!(typeof(this))();
120 		return ptrcall!(Transform)(_classBinding.getCellSpaceTransform, _godot_object);
121 	}
122 	/**
123 	
124 	*/
125 	void setCellSubdiv(in long cell_subdiv)
126 	{
127 		checkClassBinding!(typeof(this))();
128 		ptrcall!(void)(_classBinding.setCellSubdiv, _godot_object, cell_subdiv);
129 	}
130 	/**
131 	
132 	*/
133 	long getCellSubdiv() const
134 	{
135 		checkClassBinding!(typeof(this))();
136 		return ptrcall!(long)(_classBinding.getCellSubdiv, _godot_object);
137 	}
138 	/**
139 	
140 	*/
141 	void setOctree(in PoolByteArray octree)
142 	{
143 		checkClassBinding!(typeof(this))();
144 		ptrcall!(void)(_classBinding.setOctree, _godot_object, octree);
145 	}
146 	/**
147 	
148 	*/
149 	PoolByteArray getOctree() const
150 	{
151 		checkClassBinding!(typeof(this))();
152 		return ptrcall!(PoolByteArray)(_classBinding.getOctree, _godot_object);
153 	}
154 	/**
155 	
156 	*/
157 	void setEnergy(in double energy)
158 	{
159 		checkClassBinding!(typeof(this))();
160 		ptrcall!(void)(_classBinding.setEnergy, _godot_object, energy);
161 	}
162 	/**
163 	
164 	*/
165 	double getEnergy() const
166 	{
167 		checkClassBinding!(typeof(this))();
168 		return ptrcall!(double)(_classBinding.getEnergy, _godot_object);
169 	}
170 	/**
171 	
172 	*/
173 	void addUser(NodePathArg0)(in NodePathArg0 path, Texture lightmap, in long instance)
174 	{
175 		checkClassBinding!(typeof(this))();
176 		ptrcall!(void)(_classBinding.addUser, _godot_object, path, lightmap, instance);
177 	}
178 	/**
179 	
180 	*/
181 	long getUserCount() const
182 	{
183 		checkClassBinding!(typeof(this))();
184 		return ptrcall!(long)(_classBinding.getUserCount, _godot_object);
185 	}
186 	/**
187 	
188 	*/
189 	NodePath getUserPath(in long user_idx) const
190 	{
191 		checkClassBinding!(typeof(this))();
192 		return ptrcall!(NodePath)(_classBinding.getUserPath, _godot_object, user_idx);
193 	}
194 	/**
195 	
196 	*/
197 	Ref!Texture getUserLightmap(in long user_idx) const
198 	{
199 		checkClassBinding!(typeof(this))();
200 		return ptrcall!(Texture)(_classBinding.getUserLightmap, _godot_object, user_idx);
201 	}
202 	/**
203 	
204 	*/
205 	void clearUsers()
206 	{
207 		checkClassBinding!(typeof(this))();
208 		ptrcall!(void)(_classBinding.clearUsers, _godot_object);
209 	}
210 	/**
211 	
212 	*/
213 	@property AABB bounds()
214 	{
215 		return getBounds();
216 	}
217 	/// ditto
218 	@property void bounds(AABB v)
219 	{
220 		setBounds(v);
221 	}
222 	/**
223 	
224 	*/
225 	@property Transform cellSpaceTransform()
226 	{
227 		return getCellSpaceTransform();
228 	}
229 	/// ditto
230 	@property void cellSpaceTransform(Transform v)
231 	{
232 		setCellSpaceTransform(v);
233 	}
234 	/**
235 	
236 	*/
237 	@property long cellSubdiv()
238 	{
239 		return getCellSubdiv();
240 	}
241 	/// ditto
242 	@property void cellSubdiv(long v)
243 	{
244 		setCellSubdiv(v);
245 	}
246 	/**
247 	
248 	*/
249 	@property double energy()
250 	{
251 		return getEnergy();
252 	}
253 	/// ditto
254 	@property void energy(double v)
255 	{
256 		setEnergy(v);
257 	}
258 	/**
259 	
260 	*/
261 	@property PoolByteArray octree()
262 	{
263 		return getOctree();
264 	}
265 	/// ditto
266 	@property void octree(PoolByteArray v)
267 	{
268 		setOctree(v);
269 	}
270 	/**
271 	
272 	*/
273 	@property Array userData()
274 	{
275 		return _getUserData();
276 	}
277 	/// ditto
278 	@property void userData(Array v)
279 	{
280 		_setUserData(v);
281 	}
282 }