1 /**
2 A CSG Box shape.
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.csgbox;
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.csgprimitive;
24 import godot.material;
25 import godot.csgshape;
26 import godot.visualinstance;
27 import godot.spatial;
28 import godot.node;
29 /**
30 A CSG Box shape.
31 
32 This node allows you to create a box for use with the CSG system.
33 */
34 @GodotBaseClass struct CSGBox
35 {
36 	enum string _GODOT_internal_name = "CSGBox";
37 public:
38 @nogc nothrow:
39 	union { godot_object _godot_object; CSGPrimitive _GODOT_base; }
40 	alias _GODOT_base this;
41 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
42 	package(godot) __gshared bool _classBindingInitialized = false;
43 	package(godot) static struct _classBinding
44 	{
45 		__gshared:
46 		@GodotName("set_width") GodotMethod!(void, double) setWidth;
47 		@GodotName("get_width") GodotMethod!(double) getWidth;
48 		@GodotName("set_height") GodotMethod!(void, double) setHeight;
49 		@GodotName("get_height") GodotMethod!(double) getHeight;
50 		@GodotName("set_depth") GodotMethod!(void, double) setDepth;
51 		@GodotName("get_depth") GodotMethod!(double) getDepth;
52 		@GodotName("set_material") GodotMethod!(void, Material) setMaterial;
53 		@GodotName("get_material") GodotMethod!(Material) getMaterial;
54 	}
55 	bool opEquals(in CSGBox other) const { return _godot_object.ptr is other._godot_object.ptr; }
56 	CSGBox 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 CSGBox _new()
60 	{
61 		static godot_class_constructor constructor;
62 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("CSGBox");
63 		if(constructor is null) return typeof(this).init;
64 		return cast(CSGBox)(constructor());
65 	}
66 	@disable new(size_t s);
67 	/**
68 	
69 	*/
70 	void setWidth(in double width)
71 	{
72 		checkClassBinding!(typeof(this))();
73 		ptrcall!(void)(_classBinding.setWidth, _godot_object, width);
74 	}
75 	/**
76 	
77 	*/
78 	double getWidth() const
79 	{
80 		checkClassBinding!(typeof(this))();
81 		return ptrcall!(double)(_classBinding.getWidth, _godot_object);
82 	}
83 	/**
84 	
85 	*/
86 	void setHeight(in double height)
87 	{
88 		checkClassBinding!(typeof(this))();
89 		ptrcall!(void)(_classBinding.setHeight, _godot_object, height);
90 	}
91 	/**
92 	
93 	*/
94 	double getHeight() const
95 	{
96 		checkClassBinding!(typeof(this))();
97 		return ptrcall!(double)(_classBinding.getHeight, _godot_object);
98 	}
99 	/**
100 	
101 	*/
102 	void setDepth(in double depth)
103 	{
104 		checkClassBinding!(typeof(this))();
105 		ptrcall!(void)(_classBinding.setDepth, _godot_object, depth);
106 	}
107 	/**
108 	
109 	*/
110 	double getDepth() const
111 	{
112 		checkClassBinding!(typeof(this))();
113 		return ptrcall!(double)(_classBinding.getDepth, _godot_object);
114 	}
115 	/**
116 	
117 	*/
118 	void setMaterial(Material material)
119 	{
120 		checkClassBinding!(typeof(this))();
121 		ptrcall!(void)(_classBinding.setMaterial, _godot_object, material);
122 	}
123 	/**
124 	
125 	*/
126 	Ref!Material getMaterial() const
127 	{
128 		checkClassBinding!(typeof(this))();
129 		return ptrcall!(Material)(_classBinding.getMaterial, _godot_object);
130 	}
131 	/**
132 	Width of the box measured from the center of the box.
133 	*/
134 	@property double width()
135 	{
136 		return getWidth();
137 	}
138 	/// ditto
139 	@property void width(double v)
140 	{
141 		setWidth(v);
142 	}
143 	/**
144 	Height of the box measured from the center of the box.
145 	*/
146 	@property double height()
147 	{
148 		return getHeight();
149 	}
150 	/// ditto
151 	@property void height(double v)
152 	{
153 		setHeight(v);
154 	}
155 	/**
156 	Depth of the box measured from the center of the box.
157 	*/
158 	@property double depth()
159 	{
160 		return getDepth();
161 	}
162 	/// ditto
163 	@property void depth(double v)
164 	{
165 		setDepth(v);
166 	}
167 }