Files
Seele/src/Engine/System/MeshUpdater.cpp
T

17 lines
540 B
C++
Raw Normal View History

2023-10-24 15:01:09 +02:00
#include "MeshUpdater.h"
2023-11-26 09:40:48 +01:00
#include "Component/Mesh.h"
2024-01-24 23:10:33 +01:00
#include "Graphics/Mesh.h"
2023-10-24 15:01:09 +02:00
using namespace Seele;
using namespace Seele::System;
2024-06-09 12:20:04 +02:00
MeshUpdater::MeshUpdater(PScene scene) : ComponentSystem<Component::Transform, Component::Mesh>(scene) {}
2023-10-26 18:37:29 +02:00
2024-06-09 12:20:04 +02:00
MeshUpdater::~MeshUpdater() {}
2023-11-01 23:12:30 +01:00
2024-06-09 12:20:04 +02:00
void MeshUpdater::update(entt::entity id, Component::Transform& transform, Component::Mesh& comp) {
for (uint32 i = 0; i < comp.asset->meshes.size(); ++i) {
2024-06-07 09:19:47 +02:00
comp.asset->meshes[i]->vertexData->updateMesh(id, i, comp.asset->meshes[i], transform);
2023-11-26 09:40:48 +01:00
}
2023-10-24 15:01:09 +02:00
}