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.skeletonik; 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.node; 24 import godot.skeleton; 25 /** 26 27 */ 28 @GodotBaseClass struct SkeletonIK 29 { 30 enum string _GODOT_internal_name = "SkeletonIK"; 31 public: 32 @nogc nothrow: 33 union { godot_object _godot_object; Node _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_root_bone") GodotMethod!(void, String) setRootBone; 41 @GodotName("get_root_bone") GodotMethod!(String) getRootBone; 42 @GodotName("set_tip_bone") GodotMethod!(void, String) setTipBone; 43 @GodotName("get_tip_bone") GodotMethod!(String) getTipBone; 44 @GodotName("set_interpolation") GodotMethod!(void, double) setInterpolation; 45 @GodotName("get_interpolation") GodotMethod!(double) getInterpolation; 46 @GodotName("set_target_transform") GodotMethod!(void, Transform) setTargetTransform; 47 @GodotName("get_target_transform") GodotMethod!(Transform) getTargetTransform; 48 @GodotName("set_target_node") GodotMethod!(void, NodePath) setTargetNode; 49 @GodotName("get_target_node") GodotMethod!(NodePath) getTargetNode; 50 @GodotName("set_use_magnet") GodotMethod!(void, bool) setUseMagnet; 51 @GodotName("is_using_magnet") GodotMethod!(bool) isUsingMagnet; 52 @GodotName("set_magnet_position") GodotMethod!(void, Vector3) setMagnetPosition; 53 @GodotName("get_magnet_position") GodotMethod!(Vector3) getMagnetPosition; 54 @GodotName("get_parent_skeleton") GodotMethod!(Skeleton) getParentSkeleton; 55 @GodotName("is_running") GodotMethod!(bool) isRunning; 56 @GodotName("set_min_distance") GodotMethod!(void, double) setMinDistance; 57 @GodotName("get_min_distance") GodotMethod!(double) getMinDistance; 58 @GodotName("set_max_iterations") GodotMethod!(void, long) setMaxIterations; 59 @GodotName("get_max_iterations") GodotMethod!(long) getMaxIterations; 60 @GodotName("start") GodotMethod!(void, bool) start; 61 @GodotName("stop") GodotMethod!(void) stop; 62 } 63 bool opEquals(in SkeletonIK other) const { return _godot_object.ptr is other._godot_object.ptr; } 64 SkeletonIK opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 65 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 66 mixin baseCasts; 67 static SkeletonIK _new() 68 { 69 static godot_class_constructor constructor; 70 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("SkeletonIK"); 71 if(constructor is null) return typeof(this).init; 72 return cast(SkeletonIK)(constructor()); 73 } 74 @disable new(size_t s); 75 /** 76 77 */ 78 void setRootBone(StringArg0)(in StringArg0 root_bone) 79 { 80 checkClassBinding!(typeof(this))(); 81 ptrcall!(void)(_classBinding.setRootBone, _godot_object, root_bone); 82 } 83 /** 84 85 */ 86 String getRootBone() const 87 { 88 checkClassBinding!(typeof(this))(); 89 return ptrcall!(String)(_classBinding.getRootBone, _godot_object); 90 } 91 /** 92 93 */ 94 void setTipBone(StringArg0)(in StringArg0 tip_bone) 95 { 96 checkClassBinding!(typeof(this))(); 97 ptrcall!(void)(_classBinding.setTipBone, _godot_object, tip_bone); 98 } 99 /** 100 101 */ 102 String getTipBone() const 103 { 104 checkClassBinding!(typeof(this))(); 105 return ptrcall!(String)(_classBinding.getTipBone, _godot_object); 106 } 107 /** 108 109 */ 110 void setInterpolation(in double interpolation) 111 { 112 checkClassBinding!(typeof(this))(); 113 ptrcall!(void)(_classBinding.setInterpolation, _godot_object, interpolation); 114 } 115 /** 116 117 */ 118 double getInterpolation() const 119 { 120 checkClassBinding!(typeof(this))(); 121 return ptrcall!(double)(_classBinding.getInterpolation, _godot_object); 122 } 123 /** 124 125 */ 126 void setTargetTransform(in Transform target) 127 { 128 checkClassBinding!(typeof(this))(); 129 ptrcall!(void)(_classBinding.setTargetTransform, _godot_object, target); 130 } 131 /** 132 133 */ 134 Transform getTargetTransform() const 135 { 136 checkClassBinding!(typeof(this))(); 137 return ptrcall!(Transform)(_classBinding.getTargetTransform, _godot_object); 138 } 139 /** 140 141 */ 142 void setTargetNode(NodePathArg0)(in NodePathArg0 node) 143 { 144 checkClassBinding!(typeof(this))(); 145 ptrcall!(void)(_classBinding.setTargetNode, _godot_object, node); 146 } 147 /** 148 149 */ 150 NodePath getTargetNode() 151 { 152 checkClassBinding!(typeof(this))(); 153 return ptrcall!(NodePath)(_classBinding.getTargetNode, _godot_object); 154 } 155 /** 156 157 */ 158 void setUseMagnet(in bool use) 159 { 160 checkClassBinding!(typeof(this))(); 161 ptrcall!(void)(_classBinding.setUseMagnet, _godot_object, use); 162 } 163 /** 164 165 */ 166 bool isUsingMagnet() const 167 { 168 checkClassBinding!(typeof(this))(); 169 return ptrcall!(bool)(_classBinding.isUsingMagnet, _godot_object); 170 } 171 /** 172 173 */ 174 void setMagnetPosition(in Vector3 local_position) 175 { 176 checkClassBinding!(typeof(this))(); 177 ptrcall!(void)(_classBinding.setMagnetPosition, _godot_object, local_position); 178 } 179 /** 180 181 */ 182 Vector3 getMagnetPosition() const 183 { 184 checkClassBinding!(typeof(this))(); 185 return ptrcall!(Vector3)(_classBinding.getMagnetPosition, _godot_object); 186 } 187 /** 188 189 */ 190 Skeleton getParentSkeleton() const 191 { 192 checkClassBinding!(typeof(this))(); 193 return ptrcall!(Skeleton)(_classBinding.getParentSkeleton, _godot_object); 194 } 195 /** 196 197 */ 198 bool isRunning() 199 { 200 checkClassBinding!(typeof(this))(); 201 return ptrcall!(bool)(_classBinding.isRunning, _godot_object); 202 } 203 /** 204 205 */ 206 void setMinDistance(in double min_distance) 207 { 208 checkClassBinding!(typeof(this))(); 209 ptrcall!(void)(_classBinding.setMinDistance, _godot_object, min_distance); 210 } 211 /** 212 213 */ 214 double getMinDistance() const 215 { 216 checkClassBinding!(typeof(this))(); 217 return ptrcall!(double)(_classBinding.getMinDistance, _godot_object); 218 } 219 /** 220 221 */ 222 void setMaxIterations(in long iterations) 223 { 224 checkClassBinding!(typeof(this))(); 225 ptrcall!(void)(_classBinding.setMaxIterations, _godot_object, iterations); 226 } 227 /** 228 229 */ 230 long getMaxIterations() const 231 { 232 checkClassBinding!(typeof(this))(); 233 return ptrcall!(long)(_classBinding.getMaxIterations, _godot_object); 234 } 235 /** 236 237 */ 238 void start(in bool one_time = false) 239 { 240 checkClassBinding!(typeof(this))(); 241 ptrcall!(void)(_classBinding.start, _godot_object, one_time); 242 } 243 /** 244 245 */ 246 void stop() 247 { 248 checkClassBinding!(typeof(this))(); 249 ptrcall!(void)(_classBinding.stop, _godot_object); 250 } 251 /** 252 253 */ 254 @property String rootBone() 255 { 256 return getRootBone(); 257 } 258 /// ditto 259 @property void rootBone(String v) 260 { 261 setRootBone(v); 262 } 263 /** 264 265 */ 266 @property String tipBone() 267 { 268 return getTipBone(); 269 } 270 /// ditto 271 @property void tipBone(String v) 272 { 273 setTipBone(v); 274 } 275 /** 276 277 */ 278 @property double interpolation() 279 { 280 return getInterpolation(); 281 } 282 /// ditto 283 @property void interpolation(double v) 284 { 285 setInterpolation(v); 286 } 287 /** 288 289 */ 290 @property Transform target() 291 { 292 return getTargetTransform(); 293 } 294 /// ditto 295 @property void target(Transform v) 296 { 297 setTargetTransform(v); 298 } 299 /** 300 301 */ 302 @property bool useMagnet() 303 { 304 return isUsingMagnet(); 305 } 306 /// ditto 307 @property void useMagnet(bool v) 308 { 309 setUseMagnet(v); 310 } 311 /** 312 313 */ 314 @property Vector3 magnet() 315 { 316 return getMagnetPosition(); 317 } 318 /// ditto 319 @property void magnet(Vector3 v) 320 { 321 setMagnetPosition(v); 322 } 323 /** 324 325 */ 326 @property NodePath targetNode() 327 { 328 return getTargetNode(); 329 } 330 /// ditto 331 @property void targetNode(NodePath v) 332 { 333 setTargetNode(v); 334 } 335 /** 336 337 */ 338 @property double minDistance() 339 { 340 return getMinDistance(); 341 } 342 /// ditto 343 @property void minDistance(double v) 344 { 345 setMinDistance(v); 346 } 347 /** 348 349 */ 350 @property long maxIterations() 351 { 352 return getMaxIterations(); 353 } 354 /// ditto 355 @property void maxIterations(long v) 356 { 357 setMaxIterations(v); 358 } 359 }