Cogs.Core
ShapeSystem.h
1#pragma once
2
3#include "Systems/ComponentSystem.h"
4
5#include "Components/Geometry/ShapeComponent.h"
6
7namespace Cogs
8{
9 namespace Core
10 {
11 class Context;
12
13 class ShapeSystem : public ComponentSystem<ShapeComponent>
14 {
15 public:
16 ShapeSystem(Memory::Allocator * allocator, SizeType capacity) : ComponentSystem(allocator, capacity) {}
17
18 void initialize(Context *context) override;
19
20 void update(Context * context) override;
21
22 protected:
23 bool supportsInstancing = false;
24 bool instancedLines = false;
25
26 };
27 }
28}
Context * context
Pointer to the Context instance the system lives in.
void update()
Updates the system state to that of the current frame.
Typed component system managing a pool of components with the given ComponentType.
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
void initialize(Context *context) override
Initialize the system.
Base allocator implementation.
Definition: Allocator.h:30
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
ComponentIndex SizeType
Type used to track the size of pools.
Definition: Component.h:19