Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
SkinningManager.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_SKINNINGMANAGER_HPP
8 #define NAZARA_SKINNINGMANAGER_HPP
9 
10 #include <Nazara/Prerequesites.hpp>
11 #include <Nazara/Graphics/Config.hpp>
12 
13 namespace Nz
14 {
15  class Skeleton;
16  class SkeletalMesh;
17  class VertexBuffer;
18 
19  class NAZARA_GRAPHICS_API SkinningManager
20  {
21  friend class Graphics;
22 
23  public:
24  using SkinFunction = void (*)(const SkeletalMesh* mesh, const Skeleton* skeleton, VertexBuffer* buffer);
25 
26  SkinningManager() = delete;
27  ~SkinningManager() = delete;
28 
29  static VertexBuffer* GetBuffer(const SkeletalMesh* mesh, const Skeleton* skeleton);
30  static void Skin();
31 
32  private:
33  static bool Initialize();
34  static void OnSkeletalMeshDestroy(const SkeletalMesh* mesh);
35  static void OnSkeletonInvalidated(const Skeleton* skeleton);
36  static void OnSkeletonRelease(const Skeleton* skeleton);
37  static void Uninitialize();
38 
39  static SkinFunction s_skinFunc;
40  };
41 }
42 
43 #endif // NAZARA_SKINNINGMANAGER_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 management of skinning.
Definition: SkinningManager.hpp:19