Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
AbstractBackground.hpp
1 // Copyright (C) 2017 Jérôme Leclercq
2 // This file is part of the "Nazara Engine - Graphics module"
3 // For conditions of distribution and use, see copyright notice in Config.hpp
4 
5 #pragma once
6 
7 #ifndef NAZARA_ABSTRACTBACKGROUND_HPP
8 #define NAZARA_ABSTRACTBACKGROUND_HPP
9 
10 #include <Nazara/Prerequesites.hpp>
11 #include <Nazara/Core/ObjectLibrary.hpp>
12 #include <Nazara/Core/ObjectRef.hpp>
13 #include <Nazara/Graphics/Config.hpp>
14 #include <Nazara/Graphics/Enums.hpp>
15 
16 namespace Nz
17 {
18  class AbstractBackground;
19  class AbstractViewer;
20 
21  using BackgroundConstRef = ObjectRef<const AbstractBackground>;
22  using BackgroundLibrary = ObjectLibrary<AbstractBackground>;
23  using BackgroundRef = ObjectRef<AbstractBackground>;
24 
25  class NAZARA_GRAPHICS_API AbstractBackground : public RefCounted
26  {
27  public:
28  AbstractBackground() = default;
29  AbstractBackground(const AbstractBackground&) = default;
31  virtual ~AbstractBackground();
32 
33  virtual void Draw(const AbstractViewer* viewer) const = 0;
34 
35  virtual BackgroundType GetBackgroundType() const = 0;
36 
37  AbstractBackground& operator=(const AbstractBackground&) = default;
38  AbstractBackground& operator=(AbstractBackground&&) = delete;
39 
40  private:
41  static BackgroundLibrary::LibraryMap s_library;
42  };
43 }
44 
45 #endif // NAZARA_ABSTRACTBACKGROUND_HPP
TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
Graphics class that represents the viewer for our scene.
Definition: AbstractViewer.hpp:21
Core class that represents a reference with a counter.
Definition: RefCounted.hpp:21
Graphics class that represents the background for our scene.
Definition: AbstractBackground.hpp:25