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.visualshadernodetextureuniform; 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.visualshadernodeuniform; 24 import godot.visualshadernode; 25 import godot.resource; 26 import godot.reference; 27 /** 28 29 */ 30 @GodotBaseClass struct VisualShaderNodeTextureUniform 31 { 32 enum string _GODOT_internal_name = "VisualShaderNodeTextureUniform"; 33 public: 34 @nogc nothrow: 35 union { godot_object _godot_object; VisualShaderNodeUniform _GODOT_base; } 36 alias _GODOT_base this; 37 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 38 package(godot) __gshared bool _classBindingInitialized = false; 39 package(godot) static struct _classBinding 40 { 41 __gshared: 42 @GodotName("set_texture_type") GodotMethod!(void, long) setTextureType; 43 @GodotName("get_texture_type") GodotMethod!(VisualShaderNodeTextureUniform.TextureType) getTextureType; 44 @GodotName("set_color_default") GodotMethod!(void, long) setColorDefault; 45 @GodotName("get_color_default") GodotMethod!(VisualShaderNodeTextureUniform.ColorDefault) getColorDefault; 46 } 47 bool opEquals(in VisualShaderNodeTextureUniform other) const { return _godot_object.ptr is other._godot_object.ptr; } 48 VisualShaderNodeTextureUniform 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 VisualShaderNodeTextureUniform _new() 52 { 53 static godot_class_constructor constructor; 54 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualShaderNodeTextureUniform"); 55 if(constructor is null) return typeof(this).init; 56 return cast(VisualShaderNodeTextureUniform)(constructor()); 57 } 58 @disable new(size_t s); 59 /// 60 enum TextureType : int 61 { 62 /** 63 64 */ 65 typeData = 0, 66 /** 67 68 */ 69 typeColor = 1, 70 /** 71 72 */ 73 typeNormalmap = 2, 74 /** 75 76 */ 77 typeAniso = 3, 78 } 79 /// 80 enum ColorDefault : int 81 { 82 /** 83 84 */ 85 colorDefaultWhite = 0, 86 /** 87 88 */ 89 colorDefaultBlack = 1, 90 } 91 /// 92 enum Constants : int 93 { 94 typeData = 0, 95 colorDefaultWhite = 0, 96 colorDefaultBlack = 1, 97 typeColor = 1, 98 typeNormalmap = 2, 99 typeAniso = 3, 100 } 101 /** 102 103 */ 104 void setTextureType(in long type) 105 { 106 checkClassBinding!(typeof(this))(); 107 ptrcall!(void)(_classBinding.setTextureType, _godot_object, type); 108 } 109 /** 110 111 */ 112 VisualShaderNodeTextureUniform.TextureType getTextureType() const 113 { 114 checkClassBinding!(typeof(this))(); 115 return ptrcall!(VisualShaderNodeTextureUniform.TextureType)(_classBinding.getTextureType, _godot_object); 116 } 117 /** 118 119 */ 120 void setColorDefault(in long type) 121 { 122 checkClassBinding!(typeof(this))(); 123 ptrcall!(void)(_classBinding.setColorDefault, _godot_object, type); 124 } 125 /** 126 127 */ 128 VisualShaderNodeTextureUniform.ColorDefault getColorDefault() const 129 { 130 checkClassBinding!(typeof(this))(); 131 return ptrcall!(VisualShaderNodeTextureUniform.ColorDefault)(_classBinding.getColorDefault, _godot_object); 132 } 133 /** 134 135 */ 136 @property VisualShaderNodeTextureUniform.TextureType textureType() 137 { 138 return getTextureType(); 139 } 140 /// ditto 141 @property void textureType(long v) 142 { 143 setTextureType(v); 144 } 145 /** 146 147 */ 148 @property VisualShaderNodeTextureUniform.ColorDefault colorDefault() 149 { 150 return getColorDefault(); 151 } 152 /// ditto 153 @property void colorDefault(long v) 154 { 155 setColorDefault(v); 156 } 157 }