Loading logic moved to Asset classes
This commit is contained in:
@@ -4,19 +4,28 @@
|
||||
namespace Seele
|
||||
{
|
||||
DECLARE_REF(Mesh);
|
||||
DECLARE_REF(MaterialAsset);
|
||||
class MeshAsset : public Asset
|
||||
{
|
||||
public:
|
||||
MeshAsset();
|
||||
MeshAsset(const std::string& directory, const std::string& name);
|
||||
MeshAsset(const std::string& fullPath);
|
||||
void setMesh(PMesh mesh)
|
||||
MeshAsset(const std::filesystem::path& fullPath);
|
||||
virtual ~MeshAsset();
|
||||
virtual void save() override;
|
||||
virtual void load() override;
|
||||
void addMesh(PMesh mesh)
|
||||
{
|
||||
std::scoped_lock lck(lock);
|
||||
this->mesh = mesh;
|
||||
meshes.add(mesh);
|
||||
}
|
||||
const Array<PMesh> getMeshes() const
|
||||
{
|
||||
return meshes;
|
||||
}
|
||||
private:
|
||||
PMesh mesh;
|
||||
Array<PMesh> meshes;
|
||||
Array<PMaterialAsset> referencedMaterials;
|
||||
};
|
||||
DEFINE_REF(MeshAsset);
|
||||
} // namespace Seele
|
||||
Reference in New Issue
Block a user