ezEngine  Milestone 7
MeshResource.h
1 #pragma once
2 
3 #include <RendererCore/Meshes/MeshBufferResource.h>
4 #include <RendererCore/Meshes/MeshResourceDescriptor.h>
5 
7 
8 class EZ_RENDERERCORE_DLL ezMeshResource : public ezResource<ezMeshResource, ezMeshResourceDescriptor>
9 {
11 
12 public:
14 
17  {
18  return m_SubMeshes;
19  }
20 
22  const ezMeshBufferResourceHandle& GetMeshBuffer() const
23  {
24  return m_hMeshBuffer;
25  }
26 
28  const ezDynamicArray<ezMaterialResourceHandle>& GetMaterials() const
29  {
30  return m_Materials;
31  }
32 
34  const ezBoundingBoxSphere& GetBounds() const
35  {
36  return m_Bounds;
37  }
38 
39 private:
40  virtual ezResourceLoadDesc UnloadData(Unload WhatToUnload) override;
41  virtual ezResourceLoadDesc UpdateContent(ezStreamReaderBase* Stream) override;
42  virtual void UpdateMemoryUsage(MemoryUsage& out_NewMemoryUsage) override;
43  virtual ezResourceLoadDesc CreateResource(const ezMeshResourceDescriptor& descriptor) override;
44 
46  ezMeshBufferResourceHandle m_hMeshBuffer;
48 
49  ezBoundingBoxSphere m_Bounds;
50 
51  static ezUInt32 s_MeshBufferNameSuffix;
52 };
53