1 /**
2 The base class for $(D PanoramaSky) and $(D ProceduralSky).
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.sky;
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.resource;
23 import godot.reference;
24 /**
25 The base class for $(D PanoramaSky) and $(D ProceduralSky).
26 
27 
28 */
29 @GodotBaseClass struct Sky
30 {
31 	enum string _GODOT_internal_name = "Sky";
32 public:
33 @nogc nothrow:
34 	union { godot_object _godot_object; Resource _GODOT_base; }
35 	alias _GODOT_base this;
36 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
37 	package(godot) __gshared bool _classBindingInitialized = false;
38 	package(godot) static struct _classBinding
39 	{
40 		__gshared:
41 		@GodotName("set_radiance_size") GodotMethod!(void, long) setRadianceSize;
42 		@GodotName("get_radiance_size") GodotMethod!(Sky.RadianceSize) getRadianceSize;
43 	}
44 	bool opEquals(in Sky other) const { return _godot_object.ptr is other._godot_object.ptr; }
45 	Sky 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 Sky _new()
49 	{
50 		static godot_class_constructor constructor;
51 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("Sky");
52 		if(constructor is null) return typeof(this).init;
53 		return cast(Sky)(constructor());
54 	}
55 	@disable new(size_t s);
56 	/// 
57 	enum RadianceSize : int
58 	{
59 		/**
60 		Radiance texture size is 32x32 pixels.
61 		*/
62 		radianceSize32 = 0,
63 		/**
64 		Radiance texture size is 64x64 pixels.
65 		*/
66 		radianceSize64 = 1,
67 		/**
68 		Radiance texture size is 128x128 pixels.
69 		*/
70 		radianceSize128 = 2,
71 		/**
72 		Radiance texture size is 256x256 pixels.
73 		*/
74 		radianceSize256 = 3,
75 		/**
76 		Radiance texture size is 512x512 pixels.
77 		*/
78 		radianceSize512 = 4,
79 		/**
80 		Radiance texture size is 1024x1024 pixels.
81 		*/
82 		radianceSize1024 = 5,
83 		/**
84 		Radiance texture size is 2048x2048 pixels.
85 		*/
86 		radianceSize2048 = 6,
87 		/**
88 		Radiance texture size is the largest size it can be.
89 		*/
90 		radianceSizeMax = 7,
91 	}
92 	/// 
93 	enum Constants : int
94 	{
95 		radianceSize32 = 0,
96 		radianceSize64 = 1,
97 		radianceSize128 = 2,
98 		radianceSize256 = 3,
99 		radianceSize512 = 4,
100 		radianceSize1024 = 5,
101 		radianceSize2048 = 6,
102 		radianceSizeMax = 7,
103 	}
104 	/**
105 	
106 	*/
107 	void setRadianceSize(in long size)
108 	{
109 		checkClassBinding!(typeof(this))();
110 		ptrcall!(void)(_classBinding.setRadianceSize, _godot_object, size);
111 	}
112 	/**
113 	
114 	*/
115 	Sky.RadianceSize getRadianceSize() const
116 	{
117 		checkClassBinding!(typeof(this))();
118 		return ptrcall!(Sky.RadianceSize)(_classBinding.getRadianceSize, _godot_object);
119 	}
120 	/**
121 	The Sky's radiance map size.
122 	The higher the radiance map size, the more detailed the lighting from the Sky will be.
123 	See RADIANCE_SIZE_* constants for values. Default size is RADIANCE_SIZE_512.
124 	*/
125 	@property Sky.RadianceSize radianceSize()
126 	{
127 		return getRadianceSize();
128 	}
129 	/// ditto
130 	@property void radianceSize(long v)
131 	{
132 		setRadianceSize(v);
133 	}
134 }