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.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 cylindrical $(D PrimitiveMesh).
29 
30 
31 */
32 @GodotBaseClass struct CylinderMesh
33 {
34 	enum string _GODOT_internal_name = "CylinderMesh";
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_top_radius") GodotMethod!(void, double) setTopRadius;
45 		@GodotName("get_top_radius") GodotMethod!(double) getTopRadius;
46 		@GodotName("set_bottom_radius") GodotMethod!(void, double) setBottomRadius;
47 		@GodotName("get_bottom_radius") GodotMethod!(double) getBottomRadius;
48 		@GodotName("set_height") GodotMethod!(void, double) setHeight;
49 		@GodotName("get_height") GodotMethod!(double) getHeight;
50 		@GodotName("set_radial_segments") GodotMethod!(void, long) setRadialSegments;
51 		@GodotName("get_radial_segments") GodotMethod!(long) getRadialSegments;
52 		@GodotName("set_rings") GodotMethod!(void, long) setRings;
53 		@GodotName("get_rings") GodotMethod!(long) getRings;
54 	}
55 	bool opEquals(in CylinderMesh other) const { return _godot_object.ptr is other._godot_object.ptr; }
56 	CylinderMesh 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 CylinderMesh _new()
60 	{
61 		static godot_class_constructor constructor;
62 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("CylinderMesh");
63 		if(constructor is null) return typeof(this).init;
64 		return cast(CylinderMesh)(constructor());
65 	}
66 	@disable new(size_t s);
67 	/**
68 	
69 	*/
70 	void setTopRadius(in double radius)
71 	{
72 		checkClassBinding!(typeof(this))();
73 		ptrcall!(void)(_classBinding.setTopRadius, _godot_object, radius);
74 	}
75 	/**
76 	
77 	*/
78 	double getTopRadius() const
79 	{
80 		checkClassBinding!(typeof(this))();
81 		return ptrcall!(double)(_classBinding.getTopRadius, _godot_object);
82 	}
83 	/**
84 	
85 	*/
86 	void setBottomRadius(in double radius)
87 	{
88 		checkClassBinding!(typeof(this))();
89 		ptrcall!(void)(_classBinding.setBottomRadius, _godot_object, radius);
90 	}
91 	/**
92 	
93 	*/
94 	double getBottomRadius() const
95 	{
96 		checkClassBinding!(typeof(this))();
97 		return ptrcall!(double)(_classBinding.getBottomRadius, _godot_object);
98 	}
99 	/**
100 	
101 	*/
102 	void setHeight(in double height)
103 	{
104 		checkClassBinding!(typeof(this))();
105 		ptrcall!(void)(_classBinding.setHeight, _godot_object, height);
106 	}
107 	/**
108 	
109 	*/
110 	double getHeight() const
111 	{
112 		checkClassBinding!(typeof(this))();
113 		return ptrcall!(double)(_classBinding.getHeight, _godot_object);
114 	}
115 	/**
116 	
117 	*/
118 	void setRadialSegments(in long segments)
119 	{
120 		checkClassBinding!(typeof(this))();
121 		ptrcall!(void)(_classBinding.setRadialSegments, _godot_object, segments);
122 	}
123 	/**
124 	
125 	*/
126 	long getRadialSegments() const
127 	{
128 		checkClassBinding!(typeof(this))();
129 		return ptrcall!(long)(_classBinding.getRadialSegments, _godot_object);
130 	}
131 	/**
132 	
133 	*/
134 	void setRings(in long rings)
135 	{
136 		checkClassBinding!(typeof(this))();
137 		ptrcall!(void)(_classBinding.setRings, _godot_object, rings);
138 	}
139 	/**
140 	
141 	*/
142 	long getRings() const
143 	{
144 		checkClassBinding!(typeof(this))();
145 		return ptrcall!(long)(_classBinding.getRings, _godot_object);
146 	}
147 	/**
148 	Top radius of the cylinder. Defaults to 1.0.
149 	*/
150 	@property double topRadius()
151 	{
152 		return getTopRadius();
153 	}
154 	/// ditto
155 	@property void topRadius(double v)
156 	{
157 		setTopRadius(v);
158 	}
159 	/**
160 	Bottom radius of the cylinder. Defaults to 1.0.
161 	*/
162 	@property double bottomRadius()
163 	{
164 		return getBottomRadius();
165 	}
166 	/// ditto
167 	@property void bottomRadius(double v)
168 	{
169 		setBottomRadius(v);
170 	}
171 	/**
172 	Full height of the cylinder. Defaults to 2.0.
173 	*/
174 	@property double height()
175 	{
176 		return getHeight();
177 	}
178 	/// ditto
179 	@property void height(double v)
180 	{
181 		setHeight(v);
182 	}
183 	/**
184 	Number of radial segments on the cylinder. Defaults to 64.
185 	*/
186 	@property long radialSegments()
187 	{
188 		return getRadialSegments();
189 	}
190 	/// ditto
191 	@property void radialSegments(long v)
192 	{
193 		setRadialSegments(v);
194 	}
195 	/**
196 	Number of edge rings along the height of the cylinder. Defaults to 4.
197 	*/
198 	@property long rings()
199 	{
200 		return getRings();
201 	}
202 	/// ditto
203 	@property void rings(long v)
204 	{
205 		setRings(v);
206 	}
207 }