1 /**
2 Class representing a cylindrical $(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.cylindermesh;
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 /**
26 Class representing a cylindrical $(D PrimitiveMesh).
27 
28 This class can be used to create cones by setting either the $(D topRadius) or $(D bottomRadius) properties to 0.0.
29 */
30 @GodotBaseClass struct CylinderMesh
31 {
32 	package(godot) enum string _GODOT_internal_name = "CylinderMesh";
33 public:
34 @nogc nothrow:
35 	union { /** */ godot_object _godot_object; /** */ PrimitiveMesh _GODOT_base; }
36 	alias _GODOT_base this;
37 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
38 	package(godot) __gshared bool _classBindingInitialized = false;
39 	package(godot) static struct GDNativeClassBinding
40 	{
41 		__gshared:
42 		@GodotName("get_bottom_radius") GodotMethod!(double) getBottomRadius;
43 		@GodotName("get_height") GodotMethod!(double) getHeight;
44 		@GodotName("get_radial_segments") GodotMethod!(long) getRadialSegments;
45 		@GodotName("get_rings") GodotMethod!(long) getRings;
46 		@GodotName("get_top_radius") GodotMethod!(double) getTopRadius;
47 		@GodotName("set_bottom_radius") GodotMethod!(void, double) setBottomRadius;
48 		@GodotName("set_height") GodotMethod!(void, double) setHeight;
49 		@GodotName("set_radial_segments") GodotMethod!(void, long) setRadialSegments;
50 		@GodotName("set_rings") GodotMethod!(void, long) setRings;
51 		@GodotName("set_top_radius") GodotMethod!(void, double) setTopRadius;
52 	}
53 	/// 
54 	pragma(inline, true) bool opEquals(in CylinderMesh other) const
55 	{ return _godot_object.ptr is other._godot_object.ptr; }
56 	/// 
57 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
58 	{ _godot_object.ptr = n; return null; }
59 	/// 
60 	pragma(inline, true) bool opEquals(typeof(null) n) const
61 	{ return _godot_object.ptr is n; }
62 	/// 
63 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
64 	mixin baseCasts;
65 	/// Construct a new instance of CylinderMesh.
66 	/// Note: use `memnew!CylinderMesh` instead.
67 	static CylinderMesh _new()
68 	{
69 		static godot_class_constructor constructor;
70 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("CylinderMesh");
71 		if(constructor is null) return typeof(this).init;
72 		return cast(CylinderMesh)(constructor());
73 	}
74 	@disable new(size_t s);
75 	/**
76 	
77 	*/
78 	double getBottomRadius() const
79 	{
80 		checkClassBinding!(typeof(this))();
81 		return ptrcall!(double)(GDNativeClassBinding.getBottomRadius, _godot_object);
82 	}
83 	/**
84 	
85 	*/
86 	double getHeight() const
87 	{
88 		checkClassBinding!(typeof(this))();
89 		return ptrcall!(double)(GDNativeClassBinding.getHeight, _godot_object);
90 	}
91 	/**
92 	
93 	*/
94 	long getRadialSegments() const
95 	{
96 		checkClassBinding!(typeof(this))();
97 		return ptrcall!(long)(GDNativeClassBinding.getRadialSegments, _godot_object);
98 	}
99 	/**
100 	
101 	*/
102 	long getRings() const
103 	{
104 		checkClassBinding!(typeof(this))();
105 		return ptrcall!(long)(GDNativeClassBinding.getRings, _godot_object);
106 	}
107 	/**
108 	
109 	*/
110 	double getTopRadius() const
111 	{
112 		checkClassBinding!(typeof(this))();
113 		return ptrcall!(double)(GDNativeClassBinding.getTopRadius, _godot_object);
114 	}
115 	/**
116 	
117 	*/
118 	void setBottomRadius(in double radius)
119 	{
120 		checkClassBinding!(typeof(this))();
121 		ptrcall!(void)(GDNativeClassBinding.setBottomRadius, _godot_object, radius);
122 	}
123 	/**
124 	
125 	*/
126 	void setHeight(in double height)
127 	{
128 		checkClassBinding!(typeof(this))();
129 		ptrcall!(void)(GDNativeClassBinding.setHeight, _godot_object, height);
130 	}
131 	/**
132 	
133 	*/
134 	void setRadialSegments(in long segments)
135 	{
136 		checkClassBinding!(typeof(this))();
137 		ptrcall!(void)(GDNativeClassBinding.setRadialSegments, _godot_object, segments);
138 	}
139 	/**
140 	
141 	*/
142 	void setRings(in long rings)
143 	{
144 		checkClassBinding!(typeof(this))();
145 		ptrcall!(void)(GDNativeClassBinding.setRings, _godot_object, rings);
146 	}
147 	/**
148 	
149 	*/
150 	void setTopRadius(in double radius)
151 	{
152 		checkClassBinding!(typeof(this))();
153 		ptrcall!(void)(GDNativeClassBinding.setTopRadius, _godot_object, radius);
154 	}
155 	/**
156 	Bottom radius of the cylinder.
157 	*/
158 	@property double bottomRadius()
159 	{
160 		return getBottomRadius();
161 	}
162 	/// ditto
163 	@property void bottomRadius(double v)
164 	{
165 		setBottomRadius(v);
166 	}
167 	/**
168 	Full height of the cylinder.
169 	*/
170 	@property double height()
171 	{
172 		return getHeight();
173 	}
174 	/// ditto
175 	@property void height(double v)
176 	{
177 		setHeight(v);
178 	}
179 	/**
180 	Number of radial segments on the cylinder.
181 	*/
182 	@property long radialSegments()
183 	{
184 		return getRadialSegments();
185 	}
186 	/// ditto
187 	@property void radialSegments(long v)
188 	{
189 		setRadialSegments(v);
190 	}
191 	/**
192 	Number of edge rings along the height of the cylinder.
193 	*/
194 	@property long rings()
195 	{
196 		return getRings();
197 	}
198 	/// ditto
199 	@property void rings(long v)
200 	{
201 		setRings(v);
202 	}
203 	/**
204 	Top radius of the cylinder.
205 	*/
206 	@property double topRadius()
207 	{
208 		return getTopRadius();
209 	}
210 	/// ditto
211 	@property void topRadius(double v)
212 	{
213 		setTopRadius(v);
214 	}
215 }