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.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.primitivemesh;
24 import godot.mesh;
25 import godot.resource;
26 import godot.reference;
27 /**
28 Class representing a prism-shaped $(D PrimitiveMesh).
29 
30 
31 */
32 @GodotBaseClass struct PrismMesh
33 {
34 	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 _classBinding
42 	{
43 		__gshared:
44 		@GodotName("set_left_to_right") GodotMethod!(void, double) setLeftToRight;
45 		@GodotName("get_left_to_right") GodotMethod!(double) getLeftToRight;
46 		@GodotName("set_size") GodotMethod!(void, Vector3) setSize;
47 		@GodotName("get_size") GodotMethod!(Vector3) getSize;
48 		@GodotName("set_subdivide_width") GodotMethod!(void, long) setSubdivideWidth;
49 		@GodotName("get_subdivide_width") GodotMethod!(long) getSubdivideWidth;
50 		@GodotName("set_subdivide_height") GodotMethod!(void, long) setSubdivideHeight;
51 		@GodotName("get_subdivide_height") GodotMethod!(long) getSubdivideHeight;
52 		@GodotName("set_subdivide_depth") GodotMethod!(void, long) setSubdivideDepth;
53 		@GodotName("get_subdivide_depth") GodotMethod!(long) getSubdivideDepth;
54 	}
55 	bool opEquals(in PrismMesh other) const { return _godot_object.ptr is other._godot_object.ptr; }
56 	PrismMesh opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
57 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
58 	mixin baseCasts;
59 	static PrismMesh _new()
60 	{
61 		static godot_class_constructor constructor;
62 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("PrismMesh");
63 		if(constructor is null) return typeof(this).init;
64 		return cast(PrismMesh)(constructor());
65 	}
66 	@disable new(size_t s);
67 	/**
68 	
69 	*/
70 	void setLeftToRight(in double left_to_right)
71 	{
72 		checkClassBinding!(typeof(this))();
73 		ptrcall!(void)(_classBinding.setLeftToRight, _godot_object, left_to_right);
74 	}
75 	/**
76 	
77 	*/
78 	double getLeftToRight() const
79 	{
80 		checkClassBinding!(typeof(this))();
81 		return ptrcall!(double)(_classBinding.getLeftToRight, _godot_object);
82 	}
83 	/**
84 	
85 	*/
86 	void setSize(in Vector3 size)
87 	{
88 		checkClassBinding!(typeof(this))();
89 		ptrcall!(void)(_classBinding.setSize, _godot_object, size);
90 	}
91 	/**
92 	
93 	*/
94 	Vector3 getSize() const
95 	{
96 		checkClassBinding!(typeof(this))();
97 		return ptrcall!(Vector3)(_classBinding.getSize, _godot_object);
98 	}
99 	/**
100 	
101 	*/
102 	void setSubdivideWidth(in long segments)
103 	{
104 		checkClassBinding!(typeof(this))();
105 		ptrcall!(void)(_classBinding.setSubdivideWidth, _godot_object, segments);
106 	}
107 	/**
108 	
109 	*/
110 	long getSubdivideWidth() const
111 	{
112 		checkClassBinding!(typeof(this))();
113 		return ptrcall!(long)(_classBinding.getSubdivideWidth, _godot_object);
114 	}
115 	/**
116 	
117 	*/
118 	void setSubdivideHeight(in long segments)
119 	{
120 		checkClassBinding!(typeof(this))();
121 		ptrcall!(void)(_classBinding.setSubdivideHeight, _godot_object, segments);
122 	}
123 	/**
124 	
125 	*/
126 	long getSubdivideHeight() const
127 	{
128 		checkClassBinding!(typeof(this))();
129 		return ptrcall!(long)(_classBinding.getSubdivideHeight, _godot_object);
130 	}
131 	/**
132 	
133 	*/
134 	void setSubdivideDepth(in long segments)
135 	{
136 		checkClassBinding!(typeof(this))();
137 		ptrcall!(void)(_classBinding.setSubdivideDepth, _godot_object, segments);
138 	}
139 	/**
140 	
141 	*/
142 	long getSubdivideDepth() const
143 	{
144 		checkClassBinding!(typeof(this))();
145 		return ptrcall!(long)(_classBinding.getSubdivideDepth, _godot_object);
146 	}
147 	/**
148 	Displacement of the upper edge along the x-axis. 0.0 positions edge straight above the bottome left edge. Defaults to 0.5 (positioned on the midpoint).
149 	*/
150 	@property double leftToRight()
151 	{
152 		return getLeftToRight();
153 	}
154 	/// ditto
155 	@property void leftToRight(double v)
156 	{
157 		setLeftToRight(v);
158 	}
159 	/**
160 	Size of the prism. Defaults to (2.0, 2.0, 2.0).
161 	*/
162 	@property Vector3 size()
163 	{
164 		return getSize();
165 	}
166 	/// ditto
167 	@property void size(Vector3 v)
168 	{
169 		setSize(v);
170 	}
171 	/**
172 	Number of added edge loops along the x-axis. Defaults to 0.
173 	*/
174 	@property long subdivideWidth()
175 	{
176 		return getSubdivideWidth();
177 	}
178 	/// ditto
179 	@property void subdivideWidth(long v)
180 	{
181 		setSubdivideWidth(v);
182 	}
183 	/**
184 	Number of added edge loops along the y-axis. Defaults to 0.
185 	*/
186 	@property long subdivideHeight()
187 	{
188 		return getSubdivideHeight();
189 	}
190 	/// ditto
191 	@property void subdivideHeight(long v)
192 	{
193 		setSubdivideHeight(v);
194 	}
195 	/**
196 	Number of added edge loops along the z-axis. Defaults to 0.
197 	*/
198 	@property long subdivideDepth()
199 	{
200 		return getSubdivideDepth();
201 	}
202 	/// ditto
203 	@property void subdivideDepth(long v)
204 	{
205 		setSubdivideDepth(v);
206 	}
207 }