1 /** 2 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.physicsshapequeryparameters; 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.reference; 24 import godot.resource; 25 /** 26 27 */ 28 @GodotBaseClass struct PhysicsShapeQueryParameters 29 { 30 enum string _GODOT_internal_name = "PhysicsShapeQueryParameters"; 31 public: 32 @nogc nothrow: 33 union { godot_object _godot_object; Reference _GODOT_base; } 34 alias _GODOT_base this; 35 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 36 package(godot) __gshared bool _classBindingInitialized = false; 37 package(godot) static struct _classBinding 38 { 39 __gshared: 40 @GodotName("set_shape") GodotMethod!(void, Resource) setShape; 41 @GodotName("set_shape_rid") GodotMethod!(void, RID) setShapeRid; 42 @GodotName("get_shape_rid") GodotMethod!(RID) getShapeRid; 43 @GodotName("set_transform") GodotMethod!(void, Transform) setTransform; 44 @GodotName("get_transform") GodotMethod!(Transform) getTransform; 45 @GodotName("set_margin") GodotMethod!(void, double) setMargin; 46 @GodotName("get_margin") GodotMethod!(double) getMargin; 47 @GodotName("set_collision_mask") GodotMethod!(void, long) setCollisionMask; 48 @GodotName("get_collision_mask") GodotMethod!(long) getCollisionMask; 49 @GodotName("set_exclude") GodotMethod!(void, Array) setExclude; 50 @GodotName("get_exclude") GodotMethod!(Array) getExclude; 51 @GodotName("set_collide_with_bodies") GodotMethod!(void, bool) setCollideWithBodies; 52 @GodotName("is_collide_with_bodies_enabled") GodotMethod!(bool) isCollideWithBodiesEnabled; 53 @GodotName("set_collide_with_areas") GodotMethod!(void, bool) setCollideWithAreas; 54 @GodotName("is_collide_with_areas_enabled") GodotMethod!(bool) isCollideWithAreasEnabled; 55 } 56 bool opEquals(in PhysicsShapeQueryParameters other) const { return _godot_object.ptr is other._godot_object.ptr; } 57 PhysicsShapeQueryParameters opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 58 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 59 mixin baseCasts; 60 static PhysicsShapeQueryParameters _new() 61 { 62 static godot_class_constructor constructor; 63 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("PhysicsShapeQueryParameters"); 64 if(constructor is null) return typeof(this).init; 65 return cast(PhysicsShapeQueryParameters)(constructor()); 66 } 67 @disable new(size_t s); 68 /** 69 70 */ 71 void setShape(Resource shape) 72 { 73 checkClassBinding!(typeof(this))(); 74 ptrcall!(void)(_classBinding.setShape, _godot_object, shape); 75 } 76 /** 77 78 */ 79 void setShapeRid(in RID shape) 80 { 81 checkClassBinding!(typeof(this))(); 82 ptrcall!(void)(_classBinding.setShapeRid, _godot_object, shape); 83 } 84 /** 85 86 */ 87 RID getShapeRid() const 88 { 89 checkClassBinding!(typeof(this))(); 90 return ptrcall!(RID)(_classBinding.getShapeRid, _godot_object); 91 } 92 /** 93 94 */ 95 void setTransform(in Transform transform) 96 { 97 checkClassBinding!(typeof(this))(); 98 ptrcall!(void)(_classBinding.setTransform, _godot_object, transform); 99 } 100 /** 101 102 */ 103 Transform getTransform() const 104 { 105 checkClassBinding!(typeof(this))(); 106 return ptrcall!(Transform)(_classBinding.getTransform, _godot_object); 107 } 108 /** 109 110 */ 111 void setMargin(in double margin) 112 { 113 checkClassBinding!(typeof(this))(); 114 ptrcall!(void)(_classBinding.setMargin, _godot_object, margin); 115 } 116 /** 117 118 */ 119 double getMargin() const 120 { 121 checkClassBinding!(typeof(this))(); 122 return ptrcall!(double)(_classBinding.getMargin, _godot_object); 123 } 124 /** 125 126 */ 127 void setCollisionMask(in long collision_mask) 128 { 129 checkClassBinding!(typeof(this))(); 130 ptrcall!(void)(_classBinding.setCollisionMask, _godot_object, collision_mask); 131 } 132 /** 133 134 */ 135 long getCollisionMask() const 136 { 137 checkClassBinding!(typeof(this))(); 138 return ptrcall!(long)(_classBinding.getCollisionMask, _godot_object); 139 } 140 /** 141 142 */ 143 void setExclude(in Array exclude) 144 { 145 checkClassBinding!(typeof(this))(); 146 ptrcall!(void)(_classBinding.setExclude, _godot_object, exclude); 147 } 148 /** 149 150 */ 151 Array getExclude() const 152 { 153 checkClassBinding!(typeof(this))(); 154 return ptrcall!(Array)(_classBinding.getExclude, _godot_object); 155 } 156 /** 157 158 */ 159 void setCollideWithBodies(in bool enable) 160 { 161 checkClassBinding!(typeof(this))(); 162 ptrcall!(void)(_classBinding.setCollideWithBodies, _godot_object, enable); 163 } 164 /** 165 166 */ 167 bool isCollideWithBodiesEnabled() const 168 { 169 checkClassBinding!(typeof(this))(); 170 return ptrcall!(bool)(_classBinding.isCollideWithBodiesEnabled, _godot_object); 171 } 172 /** 173 174 */ 175 void setCollideWithAreas(in bool enable) 176 { 177 checkClassBinding!(typeof(this))(); 178 ptrcall!(void)(_classBinding.setCollideWithAreas, _godot_object, enable); 179 } 180 /** 181 182 */ 183 bool isCollideWithAreasEnabled() const 184 { 185 checkClassBinding!(typeof(this))(); 186 return ptrcall!(bool)(_classBinding.isCollideWithAreasEnabled, _godot_object); 187 } 188 /** 189 190 */ 191 @property long collisionMask() 192 { 193 return getCollisionMask(); 194 } 195 /// ditto 196 @property void collisionMask(long v) 197 { 198 setCollisionMask(v); 199 } 200 /** 201 202 */ 203 @property Array exclude() 204 { 205 return getExclude(); 206 } 207 /// ditto 208 @property void exclude(Array v) 209 { 210 setExclude(v); 211 } 212 /** 213 214 */ 215 @property double margin() 216 { 217 return getMargin(); 218 } 219 /// ditto 220 @property void margin(double v) 221 { 222 setMargin(v); 223 } 224 /** 225 226 */ 227 @property RID shapeRid() 228 { 229 return getShapeRid(); 230 } 231 /// ditto 232 @property void shapeRid(RID v) 233 { 234 setShapeRid(v); 235 } 236 /** 237 238 */ 239 @property Transform transform() 240 { 241 return getTransform(); 242 } 243 /// ditto 244 @property void transform(Transform v) 245 { 246 setTransform(v); 247 } 248 /** 249 250 */ 251 @property bool collideWithBodies() 252 { 253 return isCollideWithBodiesEnabled(); 254 } 255 /// ditto 256 @property void collideWithBodies(bool v) 257 { 258 setCollideWithBodies(v); 259 } 260 /** 261 262 */ 263 @property bool collideWithAreas() 264 { 265 return isCollideWithAreasEnabled(); 266 } 267 /// ditto 268 @property void collideWithAreas(bool v) 269 { 270 setCollideWithAreas(v); 271 } 272 }