MQEngine
载入中...
搜索中...
未找到
MeshCacheSystem.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/1/20.
3//
4
5#ifndef MESHRENDERYSTEM_H
6#define MESHRENDERYSTEM_H
8#include "../data/Component.h"
9#include "../core/Uniform.h"
10#include <unordered_map>
11#include <vector>
12
13namespace MQEngine {
14
16 public:
17 MeshCacheSystem(FCT::Context* ctx, DataManager* dataManager);
19
20 void update();
21 void collectMeshes();
22 void loadMesh(const std::string& modelUuid, const std::string& meshName);
23
24 private:
25 FCT::Mat4 calculateModelMatrix(const PositionComponent& position, const RotationComponent& rotation, const ScaleComponent& scale);
26
27 FCT::Context* m_ctx;
29
30 std::unordered_map<std::string, FCT::StaticMesh<uint32_t>*> m_loadedMeshes; // key: modelUuid + "|" + meshName
31 };
32}
33
34#endif //MESHRENDERYSTEM_H
#define ENGINE_API
定义 EnginePCH.h:14
定义 DataManager.h:58
MeshCacheSystem(FCT::Context *ctx, DataManager *dataManager)
定义 MeshCacheSystem.cpp:11
FCT::Context * m_ctx
定义 MeshCacheSystem.h:27
FCT::Mat4 calculateModelMatrix(const PositionComponent &position, const RotationComponent &rotation, const ScaleComponent &scale)
定义 MeshCacheSystem.cpp:93
std::unordered_map< std::string, FCT::StaticMesh< uint32_t > * > m_loadedMeshes
定义 MeshCacheSystem.h:30
void update()
定义 MeshCacheSystem.cpp:26
DataManager * m_dataManager
定义 MeshCacheSystem.h:28
void loadMesh(const std::string &modelUuid, const std::string &meshName)
定义 MeshCacheSystem.cpp:55
void collectMeshes()
定义 MeshCacheSystem.cpp:31
定义 application.h:5
定义 Camera.h:16