Cogs.Core
Source
Systems
Geometry
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
11
namespace
Cogs
12
{
13
namespace
Core
14
{
15
class
Context;
16
17
struct
MeshGeneratorData
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
}
Cogs::Core::ComponentSystemBase::context
Context * context
Pointer to the Context instance the system lives in.
Definition:
ComponentSystem.h:136
Cogs::Core::ComponentSystemBase::update
void update()
Updates the system state to that of the current frame.
Definition:
ComponentSystem.h:65
Cogs::Core::ComponentSystemWithDataPool
Component system with parallel data per component stored in a pool similar to how the components them...
Definition:
ComponentSystem.h:365
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::MeshGeneratorSystem
Definition:
MeshGeneratorSystem.h:27
Cogs::Memory::Allocator
Base allocator implementation.
Definition:
Allocator.h:30
Cogs::Core::ShapeType
ShapeType
Shape types generated by mesh generator.
Definition:
ShapeType.h:19
Cogs::Core::ShapeType::None
@ None
No shape.
Cogs
Contains all Cogs related functionality.
Definition:
FieldSetter.h:23
Cogs::SizeType
ComponentIndex SizeType
Type used to track the size of pools.
Definition:
Component.h:19
Cogs::Core::MeshGeneratorData
Definition:
MeshGeneratorSystem.h:18
Generated by
1.9.6