Files
Seele/src/Engine/Asset/MeshAsset.h
T

26 lines
711 B
C++
Raw Normal View History

2020-06-02 11:46:18 +02:00
#pragma once
#include "Asset.h"
2023-01-21 18:43:21 +01:00
#include "Component/Collider.h"
2020-06-02 11:46:18 +02:00
namespace Seele
{
2021-04-01 16:40:14 +02:00
DECLARE_REF(Mesh)
2023-01-21 18:43:21 +01:00
DECLARE_REF(MaterialInterface)
2020-06-02 11:46:18 +02:00
class MeshAsset : public Asset
{
public:
MeshAsset();
MeshAsset(const std::string& directory, const std::string& name);
2020-06-08 01:44:47 +02:00
MeshAsset(const std::filesystem::path& fullPath);
virtual ~MeshAsset();
2023-01-29 18:58:59 +01:00
virtual void save(Gfx::PGraphics graphics) override;
virtual void load(Gfx::PGraphics graphics) override;
void addMesh(PMesh mesh);
2022-11-30 10:19:45 +01:00
const Array<PMesh> getMeshes();
2021-06-12 18:51:29 +02:00
//Workaround while no editor
2023-01-21 18:43:21 +01:00
Array<PMaterialInterface> referencedMaterials;
2022-11-30 10:19:45 +01:00
Array<PMesh> meshes;
2023-01-21 18:43:21 +01:00
Component::Collider physicsMesh;
2020-06-02 11:46:18 +02:00
};
2021-04-01 16:40:14 +02:00
DEFINE_REF(MeshAsset)
2020-06-02 11:46:18 +02:00
} // namespace Seele