overhauled physics engine

This commit is contained in:
Dynamitos
2023-01-21 18:43:21 +01:00
parent 3c7346cf7b
commit 2208ab438a
164 changed files with 22606 additions and 928 deletions
+5 -4
View File
@@ -1,6 +1,7 @@
#pragma once
#include "MinimalEngine.h"
#include "Containers/List.h"
#include "Component/Collider.h"
#include <filesystem>
struct aiScene;
@@ -9,18 +10,18 @@ namespace Seele
{
DECLARE_REF(Mesh)
DECLARE_REF(MeshAsset)
DECLARE_REF(MaterialAsset)
DECLARE_REF(Material)
DECLARE_NAME_REF(Gfx, Graphics)
class MeshLoader
{
public:
MeshLoader(Gfx::PGraphics graphic);
~MeshLoader();
void importAsset(const std::filesystem::path& filePath);
void importAsset(const std::filesystem::path& filePath, const std::string& importPath);
private:
void loadMaterials(const aiScene* scene, Array<PMaterialAsset>& globalMaterials);
void loadMaterials(const aiScene* scene, Array<PMaterial>& globalMaterials);
void loadTextures(const aiScene* scene, const std::filesystem::path& meshPath);
void loadGlobalMeshes(const aiScene* scene, Array<PMesh>& globalMeshes, const Array<PMaterialAsset>& materials);
void loadGlobalMeshes(const aiScene* scene, const Array<PMaterial>& materials, Array<PMesh>& globalMeshes, Component::Collider& collider);
void convertAssimpARGB(unsigned char* dst, aiTexel* src, uint32 numPixels);
void import(std::filesystem::path path, PMeshAsset meshAsset);