1 /**
2 Generate an axis-aligned cuboid $(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.cubemesh;
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 Generate an axis-aligned cuboid $(D PrimitiveMesh).
29 
30 
31 */
32 @GodotBaseClass struct CubeMesh
33 {
34 	enum string _GODOT_internal_name = "CubeMesh";
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_size") GodotMethod!(void, Vector3) setSize;
45 		@GodotName("get_size") GodotMethod!(Vector3) getSize;
46 		@GodotName("set_subdivide_width") GodotMethod!(void, long) setSubdivideWidth;
47 		@GodotName("get_subdivide_width") GodotMethod!(long) getSubdivideWidth;
48 		@GodotName("set_subdivide_height") GodotMethod!(void, long) setSubdivideHeight;
49 		@GodotName("get_subdivide_height") GodotMethod!(long) getSubdivideHeight;
50 		@GodotName("set_subdivide_depth") GodotMethod!(void, long) setSubdivideDepth;
51 		@GodotName("get_subdivide_depth") GodotMethod!(long) getSubdivideDepth;
52 	}
53 	bool opEquals(in CubeMesh other) const { return _godot_object.ptr is other._godot_object.ptr; }
54 	CubeMesh opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
55 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
56 	mixin baseCasts;
57 	static CubeMesh _new()
58 	{
59 		static godot_class_constructor constructor;
60 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("CubeMesh");
61 		if(constructor is null) return typeof(this).init;
62 		return cast(CubeMesh)(constructor());
63 	}
64 	@disable new(size_t s);
65 	/**
66 	
67 	*/
68 	void setSize(in Vector3 size)
69 	{
70 		checkClassBinding!(typeof(this))();
71 		ptrcall!(void)(_classBinding.setSize, _godot_object, size);
72 	}
73 	/**
74 	
75 	*/
76 	Vector3 getSize() const
77 	{
78 		checkClassBinding!(typeof(this))();
79 		return ptrcall!(Vector3)(_classBinding.getSize, _godot_object);
80 	}
81 	/**
82 	
83 	*/
84 	void setSubdivideWidth(in long subdivide)
85 	{
86 		checkClassBinding!(typeof(this))();
87 		ptrcall!(void)(_classBinding.setSubdivideWidth, _godot_object, subdivide);
88 	}
89 	/**
90 	
91 	*/
92 	long getSubdivideWidth() const
93 	{
94 		checkClassBinding!(typeof(this))();
95 		return ptrcall!(long)(_classBinding.getSubdivideWidth, _godot_object);
96 	}
97 	/**
98 	
99 	*/
100 	void setSubdivideHeight(in long divisions)
101 	{
102 		checkClassBinding!(typeof(this))();
103 		ptrcall!(void)(_classBinding.setSubdivideHeight, _godot_object, divisions);
104 	}
105 	/**
106 	
107 	*/
108 	long getSubdivideHeight() const
109 	{
110 		checkClassBinding!(typeof(this))();
111 		return ptrcall!(long)(_classBinding.getSubdivideHeight, _godot_object);
112 	}
113 	/**
114 	
115 	*/
116 	void setSubdivideDepth(in long divisions)
117 	{
118 		checkClassBinding!(typeof(this))();
119 		ptrcall!(void)(_classBinding.setSubdivideDepth, _godot_object, divisions);
120 	}
121 	/**
122 	
123 	*/
124 	long getSubdivideDepth() const
125 	{
126 		checkClassBinding!(typeof(this))();
127 		return ptrcall!(long)(_classBinding.getSubdivideDepth, _godot_object);
128 	}
129 	/**
130 	Size of the cuboid mesh. Defaults to (2, 2, 2).
131 	*/
132 	@property Vector3 size()
133 	{
134 		return getSize();
135 	}
136 	/// ditto
137 	@property void size(Vector3 v)
138 	{
139 		setSize(v);
140 	}
141 	/**
142 	Number of extra edge loops inserted along the x-axis. Defaults to 0.
143 	*/
144 	@property long subdivideWidth()
145 	{
146 		return getSubdivideWidth();
147 	}
148 	/// ditto
149 	@property void subdivideWidth(long v)
150 	{
151 		setSubdivideWidth(v);
152 	}
153 	/**
154 	Number of extra edge loops inserted along the y-axis. Defaults to 0.
155 	*/
156 	@property long subdivideHeight()
157 	{
158 		return getSubdivideHeight();
159 	}
160 	/// ditto
161 	@property void subdivideHeight(long v)
162 	{
163 		setSubdivideHeight(v);
164 	}
165 	/**
166 	Number of extra edge loops inserted along the z-axis. Defaults to 0.
167 	*/
168 	@property long subdivideDepth()
169 	{
170 		return getSubdivideDepth();
171 	}
172 	/// ditto
173 	@property void subdivideDepth(long v)
174 	{
175 		setSubdivideDepth(v);
176 	}
177 }