1 /**
2 Default environment properties for the entire scene (post-processing effects, lighting and background settings).
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.worldenvironment;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.traits;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.globalenums;
22 import godot.object;
23 import godot.classdb;
24 import godot.node;
25 import godot.environment;
26 /**
27 Default environment properties for the entire scene (post-processing effects, lighting and background settings).
28 
29 The $(D WorldEnvironment) node is used to configure the default $(D Environment) for the scene.
30 The parameters defined in the $(D WorldEnvironment) can be overridden by an $(D Environment) node set on the current $(D Camera). Additionally, only one $(D WorldEnvironment) may be instanced in a given scene at a time.
31 The $(D WorldEnvironment) allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene.
32 */
33 @GodotBaseClass struct WorldEnvironment
34 {
35 	package(godot) enum string _GODOT_internal_name = "WorldEnvironment";
36 public:
37 @nogc nothrow:
38 	union { /** */ godot_object _godot_object; /** */ Node _GODOT_base; }
39 	alias _GODOT_base this;
40 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
41 	package(godot) __gshared bool _classBindingInitialized = false;
42 	package(godot) static struct GDNativeClassBinding
43 	{
44 		__gshared:
45 		@GodotName("get_environment") GodotMethod!(Environment) getEnvironment;
46 		@GodotName("set_environment") GodotMethod!(void, Environment) setEnvironment;
47 	}
48 	/// 
49 	pragma(inline, true) bool opEquals(in WorldEnvironment other) const
50 	{ return _godot_object.ptr is other._godot_object.ptr; }
51 	/// 
52 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
53 	{ _godot_object.ptr = n; return null; }
54 	/// 
55 	pragma(inline, true) bool opEquals(typeof(null) n) const
56 	{ return _godot_object.ptr is n; }
57 	/// 
58 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
59 	mixin baseCasts;
60 	/// Construct a new instance of WorldEnvironment.
61 	/// Note: use `memnew!WorldEnvironment` instead.
62 	static WorldEnvironment _new()
63 	{
64 		static godot_class_constructor constructor;
65 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("WorldEnvironment");
66 		if(constructor is null) return typeof(this).init;
67 		return cast(WorldEnvironment)(constructor());
68 	}
69 	@disable new(size_t s);
70 	/**
71 	
72 	*/
73 	Ref!Environment getEnvironment() const
74 	{
75 		checkClassBinding!(typeof(this))();
76 		return ptrcall!(Environment)(GDNativeClassBinding.getEnvironment, _godot_object);
77 	}
78 	/**
79 	
80 	*/
81 	void setEnvironment(Environment env)
82 	{
83 		checkClassBinding!(typeof(this))();
84 		ptrcall!(void)(GDNativeClassBinding.setEnvironment, _godot_object, env);
85 	}
86 	/**
87 	The $(D Environment) resource used by this $(D WorldEnvironment), defining the default properties.
88 	*/
89 	@property Environment environment()
90 	{
91 		return getEnvironment();
92 	}
93 	/// ditto
94 	@property void environment(Environment v)
95 	{
96 		setEnvironment(v);
97 	}
98 }