Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
ParticleRenderer.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_PARTICLERENDERER_HPP
8 #define NAZARA_PARTICLERENDERER_HPP
9 
10 #include <Nazara/Prerequesites.hpp>
11 #include <Nazara/Core/ObjectLibrary.hpp>
12 #include <Nazara/Core/ObjectRef.hpp>
13 #include <Nazara/Core/RefCounted.hpp>
14 #include <Nazara/Core/Signal.hpp>
15 #include <Nazara/Graphics/Config.hpp>
16 
17 namespace Nz
18 {
19  class AbstractRenderQueue;
20  class ParticleMapper;
21  class ParticleRenderer;
22  class ParticleGroup;
23 
24  using ParticleRendererConstRef = ObjectRef<const ParticleRenderer>;
25  using ParticleRendererLibrary = ObjectLibrary<ParticleRenderer>;
26  using ParticleRendererRef = ObjectRef<ParticleRenderer>;
27 
28  class NAZARA_GRAPHICS_API ParticleRenderer : public RefCounted
29  {
30  friend ParticleRendererLibrary;
31  friend class Graphics;
32 
33  public:
34  ParticleRenderer() = default;
35  ParticleRenderer(const ParticleRenderer& renderer);
36  virtual ~ParticleRenderer();
37 
38  virtual void Render(const ParticleGroup& system, const ParticleMapper& mapper, unsigned int startId, unsigned int endId, AbstractRenderQueue* renderQueue) = 0;
39 
40  // Signals:
41  NazaraSignal(OnParticleRendererRelease, const ParticleRenderer* /*particleRenderer*/);
42 
43  private:
44  static bool Initialize();
45  static void Uninitialize();
46 
47  static ParticleRendererLibrary::LibraryMap s_library;
48  };
49 }
50 
51 #endif // NAZARA_PARTICLERENDERER_HPP
TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
Graphics class that represents the module initializer of Graphics.
Definition: Graphics.hpp:15
Graphics class that represents the mapping between the internal buffer and the particle declaration...
Definition: ParticleMapper.hpp:17
Graphics class that represents the rendering queue for our scene.
Definition: AbstractRenderQueue.hpp:26
Core class that represents a reference with a counter.
Definition: RefCounted.hpp:21
Graphics class that represents the rendering of the particle.
Definition: ParticleRenderer.hpp:28