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.physics2dtestmotionresult; 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 /** 25 26 */ 27 @GodotBaseClass struct Physics2DTestMotionResult 28 { 29 enum string _GODOT_internal_name = "Physics2DTestMotionResult"; 30 public: 31 @nogc nothrow: 32 union { godot_object _godot_object; Reference _GODOT_base; } 33 alias _GODOT_base this; 34 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 35 package(godot) __gshared bool _classBindingInitialized = false; 36 package(godot) static struct _classBinding 37 { 38 __gshared: 39 @GodotName("get_motion") GodotMethod!(Vector2) getMotion; 40 @GodotName("get_motion_remainder") GodotMethod!(Vector2) getMotionRemainder; 41 @GodotName("get_collision_point") GodotMethod!(Vector2) getCollisionPoint; 42 @GodotName("get_collision_normal") GodotMethod!(Vector2) getCollisionNormal; 43 @GodotName("get_collider_velocity") GodotMethod!(Vector2) getColliderVelocity; 44 @GodotName("get_collider_id") GodotMethod!(long) getColliderId; 45 @GodotName("get_collider_rid") GodotMethod!(RID) getColliderRid; 46 @GodotName("get_collider") GodotMethod!(GodotObject) getCollider; 47 @GodotName("get_collider_shape") GodotMethod!(long) getColliderShape; 48 } 49 bool opEquals(in Physics2DTestMotionResult other) const { return _godot_object.ptr is other._godot_object.ptr; } 50 Physics2DTestMotionResult opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 51 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 52 mixin baseCasts; 53 static Physics2DTestMotionResult _new() 54 { 55 static godot_class_constructor constructor; 56 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("Physics2DTestMotionResult"); 57 if(constructor is null) return typeof(this).init; 58 return cast(Physics2DTestMotionResult)(constructor()); 59 } 60 @disable new(size_t s); 61 /** 62 63 */ 64 Vector2 getMotion() const 65 { 66 checkClassBinding!(typeof(this))(); 67 return ptrcall!(Vector2)(_classBinding.getMotion, _godot_object); 68 } 69 /** 70 71 */ 72 Vector2 getMotionRemainder() const 73 { 74 checkClassBinding!(typeof(this))(); 75 return ptrcall!(Vector2)(_classBinding.getMotionRemainder, _godot_object); 76 } 77 /** 78 79 */ 80 Vector2 getCollisionPoint() const 81 { 82 checkClassBinding!(typeof(this))(); 83 return ptrcall!(Vector2)(_classBinding.getCollisionPoint, _godot_object); 84 } 85 /** 86 87 */ 88 Vector2 getCollisionNormal() const 89 { 90 checkClassBinding!(typeof(this))(); 91 return ptrcall!(Vector2)(_classBinding.getCollisionNormal, _godot_object); 92 } 93 /** 94 95 */ 96 Vector2 getColliderVelocity() const 97 { 98 checkClassBinding!(typeof(this))(); 99 return ptrcall!(Vector2)(_classBinding.getColliderVelocity, _godot_object); 100 } 101 /** 102 103 */ 104 long getColliderId() const 105 { 106 checkClassBinding!(typeof(this))(); 107 return ptrcall!(long)(_classBinding.getColliderId, _godot_object); 108 } 109 /** 110 111 */ 112 RID getColliderRid() const 113 { 114 checkClassBinding!(typeof(this))(); 115 return ptrcall!(RID)(_classBinding.getColliderRid, _godot_object); 116 } 117 /** 118 119 */ 120 GodotObject getCollider() const 121 { 122 checkClassBinding!(typeof(this))(); 123 return ptrcall!(GodotObject)(_classBinding.getCollider, _godot_object); 124 } 125 /** 126 127 */ 128 long getColliderShape() const 129 { 130 checkClassBinding!(typeof(this))(); 131 return ptrcall!(long)(_classBinding.getColliderShape, _godot_object); 132 } 133 /** 134 135 */ 136 @property Vector2 motion() 137 { 138 return getMotion(); 139 } 140 /** 141 142 */ 143 @property Vector2 motionRemainder() 144 { 145 return getMotionRemainder(); 146 } 147 /** 148 149 */ 150 @property Vector2 collisionPoint() 151 { 152 return getCollisionPoint(); 153 } 154 /** 155 156 */ 157 @property Vector2 collisionNormal() 158 { 159 return getCollisionNormal(); 160 } 161 /** 162 163 */ 164 @property Vector2 colliderVelocity() 165 { 166 return getColliderVelocity(); 167 } 168 /** 169 170 */ 171 @property long colliderId() 172 { 173 return getColliderId(); 174 } 175 /** 176 177 */ 178 @property RID colliderRid() 179 { 180 return getColliderRid(); 181 } 182 /** 183 184 */ 185 @property GodotObject collider() 186 { 187 return getCollider(); 188 } 189 /** 190 191 */ 192 @property long colliderShape() 193 { 194 return getColliderShape(); 195 } 196 }