1 /**
2 Node for 2D tile-based maps.
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.tilemap;
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.node2d;
24 import godot.tileset;
25 import godot.canvasitem;
26 import godot.node;
27 /**
28 Node for 2D tile-based maps.
29 
30 Tilemaps use a $(D TileSet) which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps.
31 */
32 @GodotBaseClass struct TileMap
33 {
34 	enum string _GODOT_internal_name = "TileMap";
35 public:
36 @nogc nothrow:
37 	union { godot_object _godot_object; Node2D _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_tileset") GodotMethod!(void, TileSet) setTileset;
45 		@GodotName("get_tileset") GodotMethod!(TileSet) getTileset;
46 		@GodotName("set_mode") GodotMethod!(void, long) setMode;
47 		@GodotName("get_mode") GodotMethod!(TileMap.Mode) getMode;
48 		@GodotName("set_half_offset") GodotMethod!(void, long) setHalfOffset;
49 		@GodotName("get_half_offset") GodotMethod!(TileMap.HalfOffset) getHalfOffset;
50 		@GodotName("set_custom_transform") GodotMethod!(void, Transform2D) setCustomTransform;
51 		@GodotName("get_custom_transform") GodotMethod!(Transform2D) getCustomTransform;
52 		@GodotName("set_cell_size") GodotMethod!(void, Vector2) setCellSize;
53 		@GodotName("get_cell_size") GodotMethod!(Vector2) getCellSize;
54 		@GodotName("_set_old_cell_size") GodotMethod!(void, long) _setOldCellSize;
55 		@GodotName("_get_old_cell_size") GodotMethod!(long) _getOldCellSize;
56 		@GodotName("set_quadrant_size") GodotMethod!(void, long) setQuadrantSize;
57 		@GodotName("get_quadrant_size") GodotMethod!(long) getQuadrantSize;
58 		@GodotName("set_tile_origin") GodotMethod!(void, long) setTileOrigin;
59 		@GodotName("get_tile_origin") GodotMethod!(TileMap.TileOrigin) getTileOrigin;
60 		@GodotName("set_clip_uv") GodotMethod!(void, bool) setClipUv;
61 		@GodotName("get_clip_uv") GodotMethod!(bool) getClipUv;
62 		@GodotName("set_y_sort_mode") GodotMethod!(void, bool) setYSortMode;
63 		@GodotName("is_y_sort_mode_enabled") GodotMethod!(bool) isYSortModeEnabled;
64 		@GodotName("set_collision_use_kinematic") GodotMethod!(void, bool) setCollisionUseKinematic;
65 		@GodotName("get_collision_use_kinematic") GodotMethod!(bool) getCollisionUseKinematic;
66 		@GodotName("set_collision_layer") GodotMethod!(void, long) setCollisionLayer;
67 		@GodotName("get_collision_layer") GodotMethod!(long) getCollisionLayer;
68 		@GodotName("set_collision_mask") GodotMethod!(void, long) setCollisionMask;
69 		@GodotName("get_collision_mask") GodotMethod!(long) getCollisionMask;
70 		@GodotName("set_collision_layer_bit") GodotMethod!(void, long, bool) setCollisionLayerBit;
71 		@GodotName("get_collision_layer_bit") GodotMethod!(bool, long) getCollisionLayerBit;
72 		@GodotName("set_collision_mask_bit") GodotMethod!(void, long, bool) setCollisionMaskBit;
73 		@GodotName("get_collision_mask_bit") GodotMethod!(bool, long) getCollisionMaskBit;
74 		@GodotName("set_collision_friction") GodotMethod!(void, double) setCollisionFriction;
75 		@GodotName("get_collision_friction") GodotMethod!(double) getCollisionFriction;
76 		@GodotName("set_collision_bounce") GodotMethod!(void, double) setCollisionBounce;
77 		@GodotName("get_collision_bounce") GodotMethod!(double) getCollisionBounce;
78 		@GodotName("set_occluder_light_mask") GodotMethod!(void, long) setOccluderLightMask;
79 		@GodotName("get_occluder_light_mask") GodotMethod!(long) getOccluderLightMask;
80 		@GodotName("set_cell") GodotMethod!(void, long, long, long, bool, bool, bool, Vector2) setCell;
81 		@GodotName("set_cellv") GodotMethod!(void, Vector2, long, bool, bool, bool) setCellv;
82 		@GodotName("_set_celld") GodotMethod!(void, Vector2, Dictionary) _setCelld;
83 		@GodotName("get_cell") GodotMethod!(long, long, long) getCell;
84 		@GodotName("get_cellv") GodotMethod!(long, Vector2) getCellv;
85 		@GodotName("is_cell_x_flipped") GodotMethod!(bool, long, long) isCellXFlipped;
86 		@GodotName("is_cell_y_flipped") GodotMethod!(bool, long, long) isCellYFlipped;
87 		@GodotName("is_cell_transposed") GodotMethod!(bool, long, long) isCellTransposed;
88 		@GodotName("fix_invalid_tiles") GodotMethod!(void) fixInvalidTiles;
89 		@GodotName("clear") GodotMethod!(void) clear;
90 		@GodotName("get_used_cells") GodotMethod!(Array) getUsedCells;
91 		@GodotName("get_used_cells_by_id") GodotMethod!(Array, long) getUsedCellsById;
92 		@GodotName("get_used_rect") GodotMethod!(Rect2) getUsedRect;
93 		@GodotName("map_to_world") GodotMethod!(Vector2, Vector2, bool) mapToWorld;
94 		@GodotName("world_to_map") GodotMethod!(Vector2, Vector2) worldToMap;
95 		@GodotName("_clear_quadrants") GodotMethod!(void) _clearQuadrants;
96 		@GodotName("_recreate_quadrants") GodotMethod!(void) _recreateQuadrants;
97 		@GodotName("update_dirty_quadrants") GodotMethod!(void) updateDirtyQuadrants;
98 		@GodotName("update_bitmask_area") GodotMethod!(void, Vector2) updateBitmaskArea;
99 		@GodotName("update_bitmask_region") GodotMethod!(void, Vector2, Vector2) updateBitmaskRegion;
100 		@GodotName("_set_tile_data") GodotMethod!(void, PoolIntArray) _setTileData;
101 		@GodotName("_get_tile_data") GodotMethod!(PoolIntArray) _getTileData;
102 	}
103 	bool opEquals(in TileMap other) const { return _godot_object.ptr is other._godot_object.ptr; }
104 	TileMap opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
105 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
106 	mixin baseCasts;
107 	static TileMap _new()
108 	{
109 		static godot_class_constructor constructor;
110 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("TileMap");
111 		if(constructor is null) return typeof(this).init;
112 		return cast(TileMap)(constructor());
113 	}
114 	@disable new(size_t s);
115 	/// 
116 	enum Mode : int
117 	{
118 		/**
119 		Orthogonal orientation mode.
120 		*/
121 		modeSquare = 0,
122 		/**
123 		Isometric orientation mode.
124 		*/
125 		modeIsometric = 1,
126 		/**
127 		Custom orientation mode.
128 		*/
129 		modeCustom = 2,
130 	}
131 	/// 
132 	enum TileOrigin : int
133 	{
134 		/**
135 		Tile origin at its top-left corner.
136 		*/
137 		tileOriginTopLeft = 0,
138 		/**
139 		Tile origin at its center.
140 		*/
141 		tileOriginCenter = 1,
142 		/**
143 		Tile origin at its bottom-left corner.
144 		*/
145 		tileOriginBottomLeft = 2,
146 	}
147 	/// 
148 	enum HalfOffset : int
149 	{
150 		/**
151 		Half offset on the X coordinate.
152 		*/
153 		halfOffsetX = 0,
154 		/**
155 		Half offset on the Y coordinate.
156 		*/
157 		halfOffsetY = 1,
158 		/**
159 		Half offset disabled.
160 		*/
161 		halfOffsetDisabled = 2,
162 	}
163 	/// 
164 	enum Constants : int
165 	{
166 		/**
167 		Returned when a cell doesn't exist.
168 		*/
169 		invalidCell = -1,
170 		tileOriginTopLeft = 0,
171 		halfOffsetX = 0,
172 		modeSquare = 0,
173 		tileOriginCenter = 1,
174 		modeIsometric = 1,
175 		halfOffsetY = 1,
176 		tileOriginBottomLeft = 2,
177 		halfOffsetDisabled = 2,
178 		modeCustom = 2,
179 	}
180 	/**
181 	
182 	*/
183 	void setTileset(TileSet tileset)
184 	{
185 		checkClassBinding!(typeof(this))();
186 		ptrcall!(void)(_classBinding.setTileset, _godot_object, tileset);
187 	}
188 	/**
189 	
190 	*/
191 	Ref!TileSet getTileset() const
192 	{
193 		checkClassBinding!(typeof(this))();
194 		return ptrcall!(TileSet)(_classBinding.getTileset, _godot_object);
195 	}
196 	/**
197 	
198 	*/
199 	void setMode(in long mode)
200 	{
201 		checkClassBinding!(typeof(this))();
202 		ptrcall!(void)(_classBinding.setMode, _godot_object, mode);
203 	}
204 	/**
205 	
206 	*/
207 	TileMap.Mode getMode() const
208 	{
209 		checkClassBinding!(typeof(this))();
210 		return ptrcall!(TileMap.Mode)(_classBinding.getMode, _godot_object);
211 	}
212 	/**
213 	
214 	*/
215 	void setHalfOffset(in long half_offset)
216 	{
217 		checkClassBinding!(typeof(this))();
218 		ptrcall!(void)(_classBinding.setHalfOffset, _godot_object, half_offset);
219 	}
220 	/**
221 	
222 	*/
223 	TileMap.HalfOffset getHalfOffset() const
224 	{
225 		checkClassBinding!(typeof(this))();
226 		return ptrcall!(TileMap.HalfOffset)(_classBinding.getHalfOffset, _godot_object);
227 	}
228 	/**
229 	
230 	*/
231 	void setCustomTransform(in Transform2D custom_transform)
232 	{
233 		checkClassBinding!(typeof(this))();
234 		ptrcall!(void)(_classBinding.setCustomTransform, _godot_object, custom_transform);
235 	}
236 	/**
237 	
238 	*/
239 	Transform2D getCustomTransform() const
240 	{
241 		checkClassBinding!(typeof(this))();
242 		return ptrcall!(Transform2D)(_classBinding.getCustomTransform, _godot_object);
243 	}
244 	/**
245 	
246 	*/
247 	void setCellSize(in Vector2 size)
248 	{
249 		checkClassBinding!(typeof(this))();
250 		ptrcall!(void)(_classBinding.setCellSize, _godot_object, size);
251 	}
252 	/**
253 	
254 	*/
255 	Vector2 getCellSize() const
256 	{
257 		checkClassBinding!(typeof(this))();
258 		return ptrcall!(Vector2)(_classBinding.getCellSize, _godot_object);
259 	}
260 	/**
261 	
262 	*/
263 	void _setOldCellSize(in long size)
264 	{
265 		Array _GODOT_args = Array.empty_array;
266 		_GODOT_args.append(size);
267 		String _GODOT_method_name = String("_set_old_cell_size");
268 		this.callv(_GODOT_method_name, _GODOT_args);
269 	}
270 	/**
271 	
272 	*/
273 	long _getOldCellSize() const
274 	{
275 		Array _GODOT_args = Array.empty_array;
276 		String _GODOT_method_name = String("_get_old_cell_size");
277 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!long);
278 	}
279 	/**
280 	
281 	*/
282 	void setQuadrantSize(in long size)
283 	{
284 		checkClassBinding!(typeof(this))();
285 		ptrcall!(void)(_classBinding.setQuadrantSize, _godot_object, size);
286 	}
287 	/**
288 	
289 	*/
290 	long getQuadrantSize() const
291 	{
292 		checkClassBinding!(typeof(this))();
293 		return ptrcall!(long)(_classBinding.getQuadrantSize, _godot_object);
294 	}
295 	/**
296 	
297 	*/
298 	void setTileOrigin(in long origin)
299 	{
300 		checkClassBinding!(typeof(this))();
301 		ptrcall!(void)(_classBinding.setTileOrigin, _godot_object, origin);
302 	}
303 	/**
304 	
305 	*/
306 	TileMap.TileOrigin getTileOrigin() const
307 	{
308 		checkClassBinding!(typeof(this))();
309 		return ptrcall!(TileMap.TileOrigin)(_classBinding.getTileOrigin, _godot_object);
310 	}
311 	/**
312 	
313 	*/
314 	void setClipUv(in bool enable)
315 	{
316 		checkClassBinding!(typeof(this))();
317 		ptrcall!(void)(_classBinding.setClipUv, _godot_object, enable);
318 	}
319 	/**
320 	
321 	*/
322 	bool getClipUv() const
323 	{
324 		checkClassBinding!(typeof(this))();
325 		return ptrcall!(bool)(_classBinding.getClipUv, _godot_object);
326 	}
327 	/**
328 	
329 	*/
330 	void setYSortMode(in bool enable)
331 	{
332 		checkClassBinding!(typeof(this))();
333 		ptrcall!(void)(_classBinding.setYSortMode, _godot_object, enable);
334 	}
335 	/**
336 	
337 	*/
338 	bool isYSortModeEnabled() const
339 	{
340 		checkClassBinding!(typeof(this))();
341 		return ptrcall!(bool)(_classBinding.isYSortModeEnabled, _godot_object);
342 	}
343 	/**
344 	
345 	*/
346 	void setCollisionUseKinematic(in bool use_kinematic)
347 	{
348 		checkClassBinding!(typeof(this))();
349 		ptrcall!(void)(_classBinding.setCollisionUseKinematic, _godot_object, use_kinematic);
350 	}
351 	/**
352 	
353 	*/
354 	bool getCollisionUseKinematic() const
355 	{
356 		checkClassBinding!(typeof(this))();
357 		return ptrcall!(bool)(_classBinding.getCollisionUseKinematic, _godot_object);
358 	}
359 	/**
360 	
361 	*/
362 	void setCollisionLayer(in long layer)
363 	{
364 		checkClassBinding!(typeof(this))();
365 		ptrcall!(void)(_classBinding.setCollisionLayer, _godot_object, layer);
366 	}
367 	/**
368 	
369 	*/
370 	long getCollisionLayer() const
371 	{
372 		checkClassBinding!(typeof(this))();
373 		return ptrcall!(long)(_classBinding.getCollisionLayer, _godot_object);
374 	}
375 	/**
376 	
377 	*/
378 	void setCollisionMask(in long mask)
379 	{
380 		checkClassBinding!(typeof(this))();
381 		ptrcall!(void)(_classBinding.setCollisionMask, _godot_object, mask);
382 	}
383 	/**
384 	
385 	*/
386 	long getCollisionMask() const
387 	{
388 		checkClassBinding!(typeof(this))();
389 		return ptrcall!(long)(_classBinding.getCollisionMask, _godot_object);
390 	}
391 	/**
392 	Sets the given collision layer bit.
393 	*/
394 	void setCollisionLayerBit(in long bit, in bool value)
395 	{
396 		checkClassBinding!(typeof(this))();
397 		ptrcall!(void)(_classBinding.setCollisionLayerBit, _godot_object, bit, value);
398 	}
399 	/**
400 	Returns `true` if the given collision layer bit is set.
401 	*/
402 	bool getCollisionLayerBit(in long bit) const
403 	{
404 		checkClassBinding!(typeof(this))();
405 		return ptrcall!(bool)(_classBinding.getCollisionLayerBit, _godot_object, bit);
406 	}
407 	/**
408 	Sets the given collision mask bit.
409 	*/
410 	void setCollisionMaskBit(in long bit, in bool value)
411 	{
412 		checkClassBinding!(typeof(this))();
413 		ptrcall!(void)(_classBinding.setCollisionMaskBit, _godot_object, bit, value);
414 	}
415 	/**
416 	Returns `true` if the given collision mask bit is set.
417 	*/
418 	bool getCollisionMaskBit(in long bit) const
419 	{
420 		checkClassBinding!(typeof(this))();
421 		return ptrcall!(bool)(_classBinding.getCollisionMaskBit, _godot_object, bit);
422 	}
423 	/**
424 	
425 	*/
426 	void setCollisionFriction(in double value)
427 	{
428 		checkClassBinding!(typeof(this))();
429 		ptrcall!(void)(_classBinding.setCollisionFriction, _godot_object, value);
430 	}
431 	/**
432 	
433 	*/
434 	double getCollisionFriction() const
435 	{
436 		checkClassBinding!(typeof(this))();
437 		return ptrcall!(double)(_classBinding.getCollisionFriction, _godot_object);
438 	}
439 	/**
440 	
441 	*/
442 	void setCollisionBounce(in double value)
443 	{
444 		checkClassBinding!(typeof(this))();
445 		ptrcall!(void)(_classBinding.setCollisionBounce, _godot_object, value);
446 	}
447 	/**
448 	
449 	*/
450 	double getCollisionBounce() const
451 	{
452 		checkClassBinding!(typeof(this))();
453 		return ptrcall!(double)(_classBinding.getCollisionBounce, _godot_object);
454 	}
455 	/**
456 	
457 	*/
458 	void setOccluderLightMask(in long mask)
459 	{
460 		checkClassBinding!(typeof(this))();
461 		ptrcall!(void)(_classBinding.setOccluderLightMask, _godot_object, mask);
462 	}
463 	/**
464 	
465 	*/
466 	long getOccluderLightMask() const
467 	{
468 		checkClassBinding!(typeof(this))();
469 		return ptrcall!(long)(_classBinding.getOccluderLightMask, _godot_object);
470 	}
471 	/**
472 	Sets the tile index for the cell given by a Vector2.
473 	An index of `-1` clears the cell.
474 	Optionally, the tile can also be flipped, transposed, or given autotile coordinates.
475 	Note that data such as navigation polygons and collision shapes are not immediately updated for performance reasons.
476 	If you need these to be immediately updated, you can call $(D updateDirtyQuadrants).
477 	*/
478 	void setCell(in long x, in long y, in long tile, in bool flip_x = false, in bool flip_y = false, in bool transpose = false, in Vector2 autotile_coord = Vector2(0, 0))
479 	{
480 		checkClassBinding!(typeof(this))();
481 		ptrcall!(void)(_classBinding.setCell, _godot_object, x, y, tile, flip_x, flip_y, transpose, autotile_coord);
482 	}
483 	/**
484 	Sets the tile index for the given cell.
485 	An index of `-1` clears the cell.
486 	Optionally, the tile can also be flipped or transposed.
487 	Note that data such as navigation polygons and collision shapes are not immediately updated for performance reasons.
488 	If you need these to be immediately updated, you can call $(D updateDirtyQuadrants).
489 	*/
490 	void setCellv(in Vector2 position, in long tile, in bool flip_x = false, in bool flip_y = false, in bool transpose = false)
491 	{
492 		checkClassBinding!(typeof(this))();
493 		ptrcall!(void)(_classBinding.setCellv, _godot_object, position, tile, flip_x, flip_y, transpose);
494 	}
495 	/**
496 	
497 	*/
498 	void _setCelld(in Vector2 position, in Dictionary data)
499 	{
500 		Array _GODOT_args = Array.empty_array;
501 		_GODOT_args.append(position);
502 		_GODOT_args.append(data);
503 		String _GODOT_method_name = String("_set_celld");
504 		this.callv(_GODOT_method_name, _GODOT_args);
505 	}
506 	/**
507 	Returns the tile index of the given cell.
508 	*/
509 	long getCell(in long x, in long y) const
510 	{
511 		checkClassBinding!(typeof(this))();
512 		return ptrcall!(long)(_classBinding.getCell, _godot_object, x, y);
513 	}
514 	/**
515 	Returns the tile index of the cell given by a Vector2.
516 	*/
517 	long getCellv(in Vector2 position) const
518 	{
519 		checkClassBinding!(typeof(this))();
520 		return ptrcall!(long)(_classBinding.getCellv, _godot_object, position);
521 	}
522 	/**
523 	Returns `true` if the given cell is flipped in the x axis.
524 	*/
525 	bool isCellXFlipped(in long x, in long y) const
526 	{
527 		checkClassBinding!(typeof(this))();
528 		return ptrcall!(bool)(_classBinding.isCellXFlipped, _godot_object, x, y);
529 	}
530 	/**
531 	Returns `true` if the given cell is flipped in the y axis.
532 	*/
533 	bool isCellYFlipped(in long x, in long y) const
534 	{
535 		checkClassBinding!(typeof(this))();
536 		return ptrcall!(bool)(_classBinding.isCellYFlipped, _godot_object, x, y);
537 	}
538 	/**
539 	Returns `true` if the given cell is transposed, i.e. the x and y axes are swapped.
540 	*/
541 	bool isCellTransposed(in long x, in long y) const
542 	{
543 		checkClassBinding!(typeof(this))();
544 		return ptrcall!(bool)(_classBinding.isCellTransposed, _godot_object, x, y);
545 	}
546 	/**
547 	Clears cells that do not exist in the tileset.
548 	*/
549 	void fixInvalidTiles()
550 	{
551 		checkClassBinding!(typeof(this))();
552 		ptrcall!(void)(_classBinding.fixInvalidTiles, _godot_object);
553 	}
554 	/**
555 	Clears all cells.
556 	*/
557 	void clear()
558 	{
559 		checkClassBinding!(typeof(this))();
560 		ptrcall!(void)(_classBinding.clear, _godot_object);
561 	}
562 	/**
563 	Returns a $(D Vector2) array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from `-1`).
564 	*/
565 	Array getUsedCells() const
566 	{
567 		checkClassBinding!(typeof(this))();
568 		return ptrcall!(Array)(_classBinding.getUsedCells, _godot_object);
569 	}
570 	/**
571 	Returns an array of all cells with the given tile id.
572 	*/
573 	Array getUsedCellsById(in long id) const
574 	{
575 		checkClassBinding!(typeof(this))();
576 		return ptrcall!(Array)(_classBinding.getUsedCellsById, _godot_object, id);
577 	}
578 	/**
579 	Returns a rectangle enclosing the used (non-empty) tiles of the map.
580 	*/
581 	Rect2 getUsedRect()
582 	{
583 		checkClassBinding!(typeof(this))();
584 		return ptrcall!(Rect2)(_classBinding.getUsedRect, _godot_object);
585 	}
586 	/**
587 	Returns the global position corresponding to the given tilemap (grid-based) coordinates.
588 	Optionally, the tilemap's half offset can be ignored.
589 	*/
590 	Vector2 mapToWorld(in Vector2 map_position, in bool ignore_half_ofs = false) const
591 	{
592 		checkClassBinding!(typeof(this))();
593 		return ptrcall!(Vector2)(_classBinding.mapToWorld, _godot_object, map_position, ignore_half_ofs);
594 	}
595 	/**
596 	Returns the tilemap (grid-based) coordinatescorresponding to the given global position.
597 	*/
598 	Vector2 worldToMap(in Vector2 world_position) const
599 	{
600 		checkClassBinding!(typeof(this))();
601 		return ptrcall!(Vector2)(_classBinding.worldToMap, _godot_object, world_position);
602 	}
603 	/**
604 	
605 	*/
606 	void _clearQuadrants()
607 	{
608 		Array _GODOT_args = Array.empty_array;
609 		String _GODOT_method_name = String("_clear_quadrants");
610 		this.callv(_GODOT_method_name, _GODOT_args);
611 	}
612 	/**
613 	
614 	*/
615 	void _recreateQuadrants()
616 	{
617 		Array _GODOT_args = Array.empty_array;
618 		String _GODOT_method_name = String("_recreate_quadrants");
619 		this.callv(_GODOT_method_name, _GODOT_args);
620 	}
621 	/**
622 	Updates the tile map's quadrants, allowing things such as navigation and collision shapes to be immediately used if modified.
623 	*/
624 	void updateDirtyQuadrants()
625 	{
626 		checkClassBinding!(typeof(this))();
627 		ptrcall!(void)(_classBinding.updateDirtyQuadrants, _godot_object);
628 	}
629 	/**
630 	Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based x and y coordinates.
631 	*/
632 	void updateBitmaskArea(in Vector2 position)
633 	{
634 		checkClassBinding!(typeof(this))();
635 		ptrcall!(void)(_classBinding.updateBitmaskArea, _godot_object, position);
636 	}
637 	/**
638 	Applies autotiling rules to the cells in the given region (specified by grid-based x and y coordinates).
639 	Calling with invalid (or missing) parameters applies autotiling rules for the entire tilemap.
640 	*/
641 	void updateBitmaskRegion(in Vector2 start = Vector2(0, 0), in Vector2 end = Vector2(0, 0))
642 	{
643 		checkClassBinding!(typeof(this))();
644 		ptrcall!(void)(_classBinding.updateBitmaskRegion, _godot_object, start, end);
645 	}
646 	/**
647 	
648 	*/
649 	void _setTileData(in PoolIntArray arg0)
650 	{
651 		Array _GODOT_args = Array.empty_array;
652 		_GODOT_args.append(arg0);
653 		String _GODOT_method_name = String("_set_tile_data");
654 		this.callv(_GODOT_method_name, _GODOT_args);
655 	}
656 	/**
657 	
658 	*/
659 	PoolIntArray _getTileData() const
660 	{
661 		Array _GODOT_args = Array.empty_array;
662 		String _GODOT_method_name = String("_get_tile_data");
663 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!PoolIntArray);
664 	}
665 	/**
666 	The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE.
667 	*/
668 	@property TileMap.Mode mode()
669 	{
670 		return getMode();
671 	}
672 	/// ditto
673 	@property void mode(long v)
674 	{
675 		setMode(v);
676 	}
677 	/**
678 	The assigned $(D TileSet).
679 	*/
680 	@property TileSet tileSet()
681 	{
682 		return getTileset();
683 	}
684 	/// ditto
685 	@property void tileSet(TileSet v)
686 	{
687 		setTileset(v);
688 	}
689 	/**
690 	The TileMap's cell size.
691 	*/
692 	@property Vector2 cellSize()
693 	{
694 		return getCellSize();
695 	}
696 	/// ditto
697 	@property void cellSize(Vector2 v)
698 	{
699 		setCellSize(v);
700 	}
701 	/**
702 	The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16.
703 	*/
704 	@property long cellQuadrantSize()
705 	{
706 		return getQuadrantSize();
707 	}
708 	/// ditto
709 	@property void cellQuadrantSize(long v)
710 	{
711 		setQuadrantSize(v);
712 	}
713 	/**
714 	The custom $(D Transform2D) to be applied to the TileMap's cells.
715 	*/
716 	@property Transform2D cellCustomTransform()
717 	{
718 		return getCustomTransform();
719 	}
720 	/// ditto
721 	@property void cellCustomTransform(Transform2D v)
722 	{
723 		setCustomTransform(v);
724 	}
725 	/**
726 	Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED.
727 	*/
728 	@property TileMap.HalfOffset cellHalfOffset()
729 	{
730 		return getHalfOffset();
731 	}
732 	/// ditto
733 	@property void cellHalfOffset(long v)
734 	{
735 		setHalfOffset(v);
736 	}
737 	/**
738 	Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT.
739 	*/
740 	@property TileMap.TileOrigin cellTileOrigin()
741 	{
742 		return getTileOrigin();
743 	}
744 	/// ditto
745 	@property void cellTileOrigin(long v)
746 	{
747 		setTileOrigin(v);
748 	}
749 	/**
750 	If `true` the TileMap's children will be drawn in order of their Y coordinate. Default value: `false`.
751 	*/
752 	@property bool cellYSort()
753 	{
754 		return isYSortModeEnabled();
755 	}
756 	/// ditto
757 	@property void cellYSort(bool v)
758 	{
759 		setYSortMode(v);
760 	}
761 	/**
762 	
763 	*/
764 	@property bool cellClipUv()
765 	{
766 		return getClipUv();
767 	}
768 	/// ditto
769 	@property void cellClipUv(bool v)
770 	{
771 		setClipUv(v);
772 	}
773 	/**
774 	If `true` TileMap collisions will be handled as a kinematic body. If `false` collisions will be handled as static body. Default value: `false`.
775 	*/
776 	@property bool collisionUseKinematic()
777 	{
778 		return getCollisionUseKinematic();
779 	}
780 	/// ditto
781 	@property void collisionUseKinematic(bool v)
782 	{
783 		setCollisionUseKinematic(v);
784 	}
785 	/**
786 	Friction value for static body collisions (see `collision_use_kinematic`). Default value: 1.
787 	*/
788 	@property double collisionFriction()
789 	{
790 		return getCollisionFriction();
791 	}
792 	/// ditto
793 	@property void collisionFriction(double v)
794 	{
795 		setCollisionFriction(v);
796 	}
797 	/**
798 	Bounce value for static body collisions (see `collision_use_kinematic`). Default value: 0.
799 	*/
800 	@property double collisionBounce()
801 	{
802 		return getCollisionBounce();
803 	}
804 	/// ditto
805 	@property void collisionBounce(double v)
806 	{
807 		setCollisionBounce(v);
808 	}
809 	/**
810 	The collision layer(s) for all colliders in the TileMap.
811 	*/
812 	@property long collisionLayer()
813 	{
814 		return getCollisionLayer();
815 	}
816 	/// ditto
817 	@property void collisionLayer(long v)
818 	{
819 		setCollisionLayer(v);
820 	}
821 	/**
822 	The collision mask(s) for all colliders in the TileMap.
823 	*/
824 	@property long collisionMask()
825 	{
826 		return getCollisionMask();
827 	}
828 	/// ditto
829 	@property void collisionMask(long v)
830 	{
831 		setCollisionMask(v);
832 	}
833 	/**
834 	The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s).
835 	*/
836 	@property long occluderLightMask()
837 	{
838 		return getOccluderLightMask();
839 	}
840 	/// ditto
841 	@property void occluderLightMask(long v)
842 	{
843 		setOccluderLightMask(v);
844 	}
845 }