Rework API graphique Vulkan - EnTT pour ECS + Chargement modèle 3D assimp + SDL3 pour events input et fenetre + mesh texture camera transform ok + attention tous les assets nouveaus ne sont pas commités et il y a du code test en dur dans scene addentity + restructuration globale

This commit is contained in:
Tom Ray
2026-03-14 20:24:17 +01:00
parent 7c352bc280
commit 6695d46bcd
672 changed files with 238656 additions and 1821 deletions
+12 -17
View File
@@ -1,37 +1,32 @@
#ifndef CSCENE_HPP
#define CSCENE_HPP
#include "../Component/Geometry/CTransform.hpp"
#include "../Component/Meta/CMetaData.hpp"
#include <entt/entt.hpp>
#include "../Systems/EntityComponentManager.hpp"
#include "../Utils/CSerializable.hpp"
#include <string>
#include <vulkan/vulkan_raii.hpp>
namespace CosmicCore {;
namespace CosmicCore {
class CEntity;
class CScene : public CSerializable {
using ECManager = entt::registry;
private:
// The name of the scene.
std::string m_name;
ECManager m_ecManager;
EntityComponentManager m_ecManager;
public:
CScene() = delete;
CScene(std::string name);
~CScene() = default;
virtual ~CScene() = default;
unsigned int getNumEntity() const;
CEntity addEntity(std::string name, std::string description){
auto handle = m_ecManager.create();
CEntity handler(m_ecManager, handle);
m_ecManager.emplace<CTransform>(handle, handler);
m_ecManager.emplace<CMetaData>(handle, handler, std::move(name), std::move(description));
return handler;
}
CEntity addEntity(std::string name, std::string description);
std::string getName() const;
EntityComponentManager& getECManager(){return m_ecManager;};
void removeEntity(unsigned int index, bool destroy = true);
//CEntity* getActiveCamera();
@@ -73,7 +68,7 @@ namespace CosmicCore {;
*/
//unsigned int getMask();
void render();
void render(vk::raii::CommandBuffer& cmd, uint32_t frameIndex);
//void updateScript();
nlohmann::json to_json();