1 /**
2 Class representing a capsule-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.capsulemesh;
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 capsule-shaped $(D PrimitiveMesh).
27 
28 
29 */
30 @GodotBaseClass struct CapsuleMesh
31 {
32 	package(godot) enum string _GODOT_internal_name = "CapsuleMesh";
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_mid_height") GodotMethod!(double) getMidHeight;
43 		@GodotName("get_radial_segments") GodotMethod!(long) getRadialSegments;
44 		@GodotName("get_radius") GodotMethod!(double) getRadius;
45 		@GodotName("get_rings") GodotMethod!(long) getRings;
46 		@GodotName("set_mid_height") GodotMethod!(void, double) setMidHeight;
47 		@GodotName("set_radial_segments") GodotMethod!(void, long) setRadialSegments;
48 		@GodotName("set_radius") GodotMethod!(void, double) setRadius;
49 		@GodotName("set_rings") GodotMethod!(void, long) setRings;
50 	}
51 	/// 
52 	pragma(inline, true) bool opEquals(in CapsuleMesh other) const
53 	{ return _godot_object.ptr is other._godot_object.ptr; }
54 	/// 
55 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
56 	{ _godot_object.ptr = n; return null; }
57 	/// 
58 	pragma(inline, true) bool opEquals(typeof(null) n) const
59 	{ return _godot_object.ptr is n; }
60 	/// 
61 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
62 	mixin baseCasts;
63 	/// Construct a new instance of CapsuleMesh.
64 	/// Note: use `memnew!CapsuleMesh` instead.
65 	static CapsuleMesh _new()
66 	{
67 		static godot_class_constructor constructor;
68 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("CapsuleMesh");
69 		if(constructor is null) return typeof(this).init;
70 		return cast(CapsuleMesh)(constructor());
71 	}
72 	@disable new(size_t s);
73 	/**
74 	
75 	*/
76 	double getMidHeight() const
77 	{
78 		checkClassBinding!(typeof(this))();
79 		return ptrcall!(double)(GDNativeClassBinding.getMidHeight, _godot_object);
80 	}
81 	/**
82 	
83 	*/
84 	long getRadialSegments() const
85 	{
86 		checkClassBinding!(typeof(this))();
87 		return ptrcall!(long)(GDNativeClassBinding.getRadialSegments, _godot_object);
88 	}
89 	/**
90 	
91 	*/
92 	double getRadius() const
93 	{
94 		checkClassBinding!(typeof(this))();
95 		return ptrcall!(double)(GDNativeClassBinding.getRadius, _godot_object);
96 	}
97 	/**
98 	
99 	*/
100 	long getRings() const
101 	{
102 		checkClassBinding!(typeof(this))();
103 		return ptrcall!(long)(GDNativeClassBinding.getRings, _godot_object);
104 	}
105 	/**
106 	
107 	*/
108 	void setMidHeight(in double mid_height)
109 	{
110 		checkClassBinding!(typeof(this))();
111 		ptrcall!(void)(GDNativeClassBinding.setMidHeight, _godot_object, mid_height);
112 	}
113 	/**
114 	
115 	*/
116 	void setRadialSegments(in long segments)
117 	{
118 		checkClassBinding!(typeof(this))();
119 		ptrcall!(void)(GDNativeClassBinding.setRadialSegments, _godot_object, segments);
120 	}
121 	/**
122 	
123 	*/
124 	void setRadius(in double radius)
125 	{
126 		checkClassBinding!(typeof(this))();
127 		ptrcall!(void)(GDNativeClassBinding.setRadius, _godot_object, radius);
128 	}
129 	/**
130 	
131 	*/
132 	void setRings(in long rings)
133 	{
134 		checkClassBinding!(typeof(this))();
135 		ptrcall!(void)(GDNativeClassBinding.setRings, _godot_object, rings);
136 	}
137 	/**
138 	Height of the middle cylindrical part of the capsule (without the hemispherical ends).
139 	$(B Note:) The capsule's total height is equal to $(D midHeight) + 2 * $(D radius).
140 	*/
141 	@property double midHeight()
142 	{
143 		return getMidHeight();
144 	}
145 	/// ditto
146 	@property void midHeight(double v)
147 	{
148 		setMidHeight(v);
149 	}
150 	/**
151 	Number of radial segments on the capsule mesh.
152 	*/
153 	@property long radialSegments()
154 	{
155 		return getRadialSegments();
156 	}
157 	/// ditto
158 	@property void radialSegments(long v)
159 	{
160 		setRadialSegments(v);
161 	}
162 	/**
163 	Radius of the capsule mesh.
164 	*/
165 	@property double radius()
166 	{
167 		return getRadius();
168 	}
169 	/// ditto
170 	@property void radius(double v)
171 	{
172 		setRadius(v);
173 	}
174 	/**
175 	Number of rings along the height of the capsule.
176 	*/
177 	@property long rings()
178 	{
179 		return getRings();
180 	}
181 	/// ditto
182 	@property void rings(long v)
183 	{
184 		setRings(v);
185 	}
186 }