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.meshinstance2d;
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.mesh;
25 import godot.texture;
26 import godot.canvasitem;
27 import godot.node;
28 /**
29 
30 */
31 @GodotBaseClass struct MeshInstance2D
32 {
33 	enum string _GODOT_internal_name = "MeshInstance2D";
34 public:
35 @nogc nothrow:
36 	union { godot_object _godot_object; Node2D _GODOT_base; }
37 	alias _GODOT_base this;
38 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
39 	package(godot) __gshared bool _classBindingInitialized = false;
40 	package(godot) static struct _classBinding
41 	{
42 		__gshared:
43 		@GodotName("set_mesh") GodotMethod!(void, Mesh) setMesh;
44 		@GodotName("get_mesh") GodotMethod!(Mesh) getMesh;
45 		@GodotName("set_texture") GodotMethod!(void, Texture) setTexture;
46 		@GodotName("get_texture") GodotMethod!(Texture) getTexture;
47 		@GodotName("set_normal_map") GodotMethod!(void, Texture) setNormalMap;
48 		@GodotName("get_normal_map") GodotMethod!(Texture) getNormalMap;
49 	}
50 	bool opEquals(in MeshInstance2D other) const { return _godot_object.ptr is other._godot_object.ptr; }
51 	MeshInstance2D opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
52 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
53 	mixin baseCasts;
54 	static MeshInstance2D _new()
55 	{
56 		static godot_class_constructor constructor;
57 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("MeshInstance2D");
58 		if(constructor is null) return typeof(this).init;
59 		return cast(MeshInstance2D)(constructor());
60 	}
61 	@disable new(size_t s);
62 	/**
63 	
64 	*/
65 	void setMesh(Mesh mesh)
66 	{
67 		checkClassBinding!(typeof(this))();
68 		ptrcall!(void)(_classBinding.setMesh, _godot_object, mesh);
69 	}
70 	/**
71 	
72 	*/
73 	Ref!Mesh getMesh() const
74 	{
75 		checkClassBinding!(typeof(this))();
76 		return ptrcall!(Mesh)(_classBinding.getMesh, _godot_object);
77 	}
78 	/**
79 	
80 	*/
81 	void setTexture(Texture texture)
82 	{
83 		checkClassBinding!(typeof(this))();
84 		ptrcall!(void)(_classBinding.setTexture, _godot_object, texture);
85 	}
86 	/**
87 	
88 	*/
89 	Ref!Texture getTexture() const
90 	{
91 		checkClassBinding!(typeof(this))();
92 		return ptrcall!(Texture)(_classBinding.getTexture, _godot_object);
93 	}
94 	/**
95 	
96 	*/
97 	void setNormalMap(Texture normal_map)
98 	{
99 		checkClassBinding!(typeof(this))();
100 		ptrcall!(void)(_classBinding.setNormalMap, _godot_object, normal_map);
101 	}
102 	/**
103 	
104 	*/
105 	Ref!Texture getNormalMap() const
106 	{
107 		checkClassBinding!(typeof(this))();
108 		return ptrcall!(Texture)(_classBinding.getNormalMap, _godot_object);
109 	}
110 	/**
111 	
112 	*/
113 	@property Mesh mesh()
114 	{
115 		return getMesh();
116 	}
117 	/// ditto
118 	@property void mesh(Mesh v)
119 	{
120 		setMesh(v);
121 	}
122 	/**
123 	
124 	*/
125 	@property Texture texture()
126 	{
127 		return getTexture();
128 	}
129 	/// ditto
130 	@property void texture(Texture v)
131 	{
132 		setTexture(v);
133 	}
134 	/**
135 	
136 	*/
137 	@property Texture normalMap()
138 	{
139 		return getNormalMap();
140 	}
141 	/// ditto
142 	@property void normalMap(Texture v)
143 	{
144 		setNormalMap(v);
145 	}
146 }