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

24 lines
550 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;
2023-10-26 18:37:29 +02:00
MeshUpdater::MeshUpdater(PScene scene)
2023-11-26 09:40:48 +01:00
: ComponentSystem<Component::Transform, Component::Mesh>(scene)
2023-10-26 18:37:29 +02:00
{
}
2023-11-01 23:12:30 +01:00
MeshUpdater::~MeshUpdater()
{
}
2024-06-07 09:19:47 +02:00
void MeshUpdater::update(entt::entity id, Component::Transform& transform, Component::Mesh& comp)
2023-10-24 15:01:09 +02:00
{
2024-06-07 09:19:47 +02:00
for (uint32 i = 0; i < comp.asset->meshes.size(); ++i)
2023-11-26 09:40:48 +01:00
{
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
}