1 /**
2 Class representing a prism-shaped $(D PrimitiveMesh).
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.prismmesh;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.traits;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.globalenums;
22 import godot.object;
23 import godot.classdb;
24 import godot.primitivemesh;
25 import godot.mesh;
26 import godot.resource;
27 /**
28 Class representing a prism-shaped $(D PrimitiveMesh).
29 
30 
31 */
32 @GodotBaseClass struct PrismMesh
33 {
34 	package(godot) enum string _GODOT_internal_name = "PrismMesh";
35 public:
36 @nogc nothrow:
37 	union { /** */ godot_object _godot_object; /** */ PrimitiveMesh _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 GDNativeClassBinding
42 	{
43 		__gshared:
44 		@GodotName("get_left_to_right") GodotMethod!(double) getLeftToRight;
45 		@GodotName("get_size") GodotMethod!(Vector3) getSize;
46 		@GodotName("get_subdivide_depth") GodotMethod!(long) getSubdivideDepth;
47 		@GodotName("get_subdivide_height") GodotMethod!(long) getSubdivideHeight;
48 		@GodotName("get_subdivide_width") GodotMethod!(long) getSubdivideWidth;
49 		@GodotName("set_left_to_right") GodotMethod!(void, double) setLeftToRight;
50 		@GodotName("set_size") GodotMethod!(void, Vector3) setSize;
51 		@GodotName("set_subdivide_depth") GodotMethod!(void, long) setSubdivideDepth;
52 		@GodotName("set_subdivide_height") GodotMethod!(void, long) setSubdivideHeight;
53 		@GodotName("set_subdivide_width") GodotMethod!(void, long) setSubdivideWidth;
54 	}
55 	/// 
56 	pragma(inline, true) bool opEquals(in PrismMesh other) const
57 	{ return _godot_object.ptr is other._godot_object.ptr; }
58 	/// 
59 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
60 	{ _godot_object.ptr = n; return null; }
61 	/// 
62 	pragma(inline, true) bool opEquals(typeof(null) n) const
63 	{ return _godot_object.ptr is n; }
64 	/// 
65 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
66 	mixin baseCasts;
67 	/// Construct a new instance of PrismMesh.
68 	/// Note: use `memnew!PrismMesh` instead.
69 	static PrismMesh _new()
70 	{
71 		static godot_class_constructor constructor;
72 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("PrismMesh");
73 		if(constructor is null) return typeof(this).init;
74 		return cast(PrismMesh)(constructor());
75 	}
76 	@disable new(size_t s);
77 	/**
78 	
79 	*/
80 	double getLeftToRight() const
81 	{
82 		checkClassBinding!(typeof(this))();
83 		return ptrcall!(double)(GDNativeClassBinding.getLeftToRight, _godot_object);
84 	}
85 	/**
86 	
87 	*/
88 	Vector3 getSize() const
89 	{
90 		checkClassBinding!(typeof(this))();
91 		return ptrcall!(Vector3)(GDNativeClassBinding.getSize, _godot_object);
92 	}
93 	/**
94 	
95 	*/
96 	long getSubdivideDepth() const
97 	{
98 		checkClassBinding!(typeof(this))();
99 		return ptrcall!(long)(GDNativeClassBinding.getSubdivideDepth, _godot_object);
100 	}
101 	/**
102 	
103 	*/
104 	long getSubdivideHeight() const
105 	{
106 		checkClassBinding!(typeof(this))();
107 		return ptrcall!(long)(GDNativeClassBinding.getSubdivideHeight, _godot_object);
108 	}
109 	/**
110 	
111 	*/
112 	long getSubdivideWidth() const
113 	{
114 		checkClassBinding!(typeof(this))();
115 		return ptrcall!(long)(GDNativeClassBinding.getSubdivideWidth, _godot_object);
116 	}
117 	/**
118 	
119 	*/
120 	void setLeftToRight(in double left_to_right)
121 	{
122 		checkClassBinding!(typeof(this))();
123 		ptrcall!(void)(GDNativeClassBinding.setLeftToRight, _godot_object, left_to_right);
124 	}
125 	/**
126 	
127 	*/
128 	void setSize(in Vector3 size)
129 	{
130 		checkClassBinding!(typeof(this))();
131 		ptrcall!(void)(GDNativeClassBinding.setSize, _godot_object, size);
132 	}
133 	/**
134 	
135 	*/
136 	void setSubdivideDepth(in long segments)
137 	{
138 		checkClassBinding!(typeof(this))();
139 		ptrcall!(void)(GDNativeClassBinding.setSubdivideDepth, _godot_object, segments);
140 	}
141 	/**
142 	
143 	*/
144 	void setSubdivideHeight(in long segments)
145 	{
146 		checkClassBinding!(typeof(this))();
147 		ptrcall!(void)(GDNativeClassBinding.setSubdivideHeight, _godot_object, segments);
148 	}
149 	/**
150 	
151 	*/
152 	void setSubdivideWidth(in long segments)
153 	{
154 		checkClassBinding!(typeof(this))();
155 		ptrcall!(void)(GDNativeClassBinding.setSubdivideWidth, _godot_object, segments);
156 	}
157 	/**
158 	Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge.
159 	*/
160 	@property double leftToRight()
161 	{
162 		return getLeftToRight();
163 	}
164 	/// ditto
165 	@property void leftToRight(double v)
166 	{
167 		setLeftToRight(v);
168 	}
169 	/**
170 	Size of the prism.
171 	*/
172 	@property Vector3 size()
173 	{
174 		return getSize();
175 	}
176 	/// ditto
177 	@property void size(Vector3 v)
178 	{
179 		setSize(v);
180 	}
181 	/**
182 	Number of added edge loops along the Z axis.
183 	*/
184 	@property long subdivideDepth()
185 	{
186 		return getSubdivideDepth();
187 	}
188 	/// ditto
189 	@property void subdivideDepth(long v)
190 	{
191 		setSubdivideDepth(v);
192 	}
193 	/**
194 	Number of added edge loops along the Y axis.
195 	*/
196 	@property long subdivideHeight()
197 	{
198 		return getSubdivideHeight();
199 	}
200 	/// ditto
201 	@property void subdivideHeight(long v)
202 	{
203 		setSubdivideHeight(v);
204 	}
205 	/**
206 	Number of added edge loops along the X axis.
207 	*/
208 	@property long subdivideWidth()
209 	{
210 		return getSubdivideWidth();
211 	}
212 	/// ditto
213 	@property void subdivideWidth(long v)
214 	{
215 		setSubdivideWidth(v);
216 	}
217 }