Cogs.Core
MeshGeneratorSystem.h
1#pragma once
2
3#include "Systems/ComponentSystem.h"
4
5#include <vector>
6
7#include "Resources/Resources.h"
8
9#include "Components/Geometry/MeshGeneratorComponent.h"
10
11namespace Cogs
12{
13 namespace Core
14 {
15 class Context;
16
18 {
19 ShapeType currentType = ShapeType::None;
20 int currentSamples = 0;
21 glm::vec3 currentSize;
22 float arcStart = 0.0f;
23 float arcEnd = 0.0f;
24 };
25
26 class MeshGeneratorSystem : public ComponentSystemWithDataPool<MeshGeneratorComponent, MeshGeneratorData>
27 {
28 public:
29 MeshGeneratorSystem(Memory::Allocator * allocator, SizeType capacity) : ComponentSystemWithDataPool(allocator, capacity) {}
30
31 void update(Context * context);
32 };
33 }
34}
Context * context
Pointer to the Context instance the system lives in.
void update()
Updates the system state to that of the current frame.
Component system with parallel data per component stored in a pool similar to how the components them...
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Base allocator implementation.
Definition: Allocator.h:30
ShapeType
Shape types generated by mesh generator.
Definition: ShapeType.h:19
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
ComponentIndex SizeType
Type used to track the size of pools.
Definition: Component.h:19