1 /** 2 Container for a $(D Curve3D). 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.path; 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.spatial; 24 import godot.curve3d; 25 import godot.node; 26 /** 27 Container for a $(D Curve3D). 28 29 This class is a container/Node-ification of a $(D Curve3D), so it can have $(D Spatial) properties and $(D Node) info. 30 */ 31 @GodotBaseClass struct Path 32 { 33 enum string _GODOT_internal_name = "Path"; 34 public: 35 @nogc nothrow: 36 union { godot_object _godot_object; Spatial _GODOT_base; } 37 alias _GODOT_base this; 38 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 39 package(godot) __gshared bool _classBindingInitialized = false; 40 package(godot) static struct _classBinding 41 { 42 __gshared: 43 @GodotName("set_curve") GodotMethod!(void, Curve3D) setCurve; 44 @GodotName("get_curve") GodotMethod!(Curve3D) getCurve; 45 @GodotName("_curve_changed") GodotMethod!(void) _curveChanged; 46 } 47 bool opEquals(in Path other) const { return _godot_object.ptr is other._godot_object.ptr; } 48 Path opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 49 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 50 mixin baseCasts; 51 static Path _new() 52 { 53 static godot_class_constructor constructor; 54 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("Path"); 55 if(constructor is null) return typeof(this).init; 56 return cast(Path)(constructor()); 57 } 58 @disable new(size_t s); 59 /** 60 61 */ 62 void setCurve(Curve3D curve) 63 { 64 checkClassBinding!(typeof(this))(); 65 ptrcall!(void)(_classBinding.setCurve, _godot_object, curve); 66 } 67 /** 68 69 */ 70 Ref!Curve3D getCurve() const 71 { 72 checkClassBinding!(typeof(this))(); 73 return ptrcall!(Curve3D)(_classBinding.getCurve, _godot_object); 74 } 75 /** 76 77 */ 78 void _curveChanged() 79 { 80 Array _GODOT_args = Array.empty_array; 81 String _GODOT_method_name = String("_curve_changed"); 82 this.callv(_GODOT_method_name, _GODOT_args); 83 } 84 /** 85 86 */ 87 @property Curve3D curve() 88 { 89 return getCurve(); 90 } 91 /// ditto 92 @property void curve(Curve3D v) 93 { 94 setCurve(v); 95 } 96 }