1 /** 2 Result of a shape query in Physics2DServer. 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.physicsshapequeryresult; 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.reference; 23 /** 24 Result of a shape query in Physics2DServer. 25 */ 26 @GodotBaseClass struct PhysicsShapeQueryResult 27 { 28 enum string _GODOT_internal_name = "PhysicsShapeQueryResult"; 29 public: 30 @nogc nothrow: 31 union { godot_object _godot_object; Reference _GODOT_base; } 32 alias _GODOT_base this; 33 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 34 package(godot) __gshared bool _classBindingInitialized = false; 35 package(godot) static struct _classBinding 36 { 37 __gshared: 38 @GodotName("get_result_count") GodotMethod!(long) getResultCount; 39 @GodotName("get_result_rid") GodotMethod!(RID, long) getResultRid; 40 @GodotName("get_result_object_id") GodotMethod!(long, long) getResultObjectId; 41 @GodotName("get_result_object") GodotMethod!(GodotObject, long) getResultObject; 42 @GodotName("get_result_object_shape") GodotMethod!(long, long) getResultObjectShape; 43 } 44 bool opEquals(in PhysicsShapeQueryResult other) const { return _godot_object.ptr is other._godot_object.ptr; } 45 PhysicsShapeQueryResult opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 46 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 47 mixin baseCasts; 48 static PhysicsShapeQueryResult _new() 49 { 50 static godot_class_constructor constructor; 51 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("PhysicsShapeQueryResult"); 52 if(constructor is null) return typeof(this).init; 53 return cast(PhysicsShapeQueryResult)(constructor()); 54 } 55 @disable new(size_t s); 56 /** 57 58 */ 59 long getResultCount() const 60 { 61 checkClassBinding!(typeof(this))(); 62 return ptrcall!(long)(_classBinding.getResultCount, _godot_object); 63 } 64 /** 65 66 */ 67 RID getResultRid(in long idx) const 68 { 69 checkClassBinding!(typeof(this))(); 70 return ptrcall!(RID)(_classBinding.getResultRid, _godot_object, idx); 71 } 72 /** 73 74 */ 75 long getResultObjectId(in long idx) const 76 { 77 checkClassBinding!(typeof(this))(); 78 return ptrcall!(long)(_classBinding.getResultObjectId, _godot_object, idx); 79 } 80 /** 81 82 */ 83 GodotObject getResultObject(in long idx) const 84 { 85 checkClassBinding!(typeof(this))(); 86 return ptrcall!(GodotObject)(_classBinding.getResultObject, _godot_object, idx); 87 } 88 /** 89 90 */ 91 long getResultObjectShape(in long idx) const 92 { 93 checkClassBinding!(typeof(this))(); 94 return ptrcall!(long)(_classBinding.getResultObjectShape, _godot_object, idx); 95 } 96 }