Reworking VertexData
This commit is contained in:
@@ -3,6 +3,8 @@ target_sources(Engine
|
||||
ComponentSystem.h
|
||||
Executor.h
|
||||
Executor.cpp
|
||||
MeshUpdater.h
|
||||
MeshUpdater.cpp
|
||||
SystemBase.h
|
||||
SystemGraph.h
|
||||
SystemGraph.cpp)
|
||||
@@ -11,6 +13,7 @@ target_sources(Engine
|
||||
PUBLIC FILE_SET HEADERS
|
||||
FILES
|
||||
ComponentSystem.h
|
||||
MeshUpdater.h
|
||||
Executor.h
|
||||
SystemBase.h
|
||||
SystemGraph.h)
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "MeshUpdater.h"
|
||||
|
||||
using namespace Seele;
|
||||
using namespace Seele::System;
|
||||
|
||||
void MeshUpdater::update(Component::Transform& transform, Component::Mesh& mesh)
|
||||
{
|
||||
mesh.vertexData->updateMesh(transform, mesh);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "ComponentSystem.h"
|
||||
#include "Component/Transform.h"
|
||||
#include "Component/Mesh.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
class MeshUpdater : public ComponentSystem<Component::Transform, Component::Mesh>
|
||||
{
|
||||
public:
|
||||
virtual void update(Component::Transform& transform, Component::Mesh& mesh) override;
|
||||
private:
|
||||
};
|
||||
} // namespace System
|
||||
} // namespace Seele
|
||||
Reference in New Issue
Block a user