Cogs.Core
TriggerSystem.h
1#pragma once
2
3#include "Systems/ComponentSystem.h"
4
5#include "TriggerComponent.h"
6#include "RigidBodySystem.h"
7
8#include <btBulletDynamicsCommon.h>
9
10#include "Services/TaskManager.h"
11
12namespace Cogs
13{
14 namespace Core
15 {
16 class PhysicsManager;
17
18 class TriggerSystem : public ComponentSystemWithDataPool<TriggerComponent, RigidBodyData>
19 {
20 public:
21 TriggerSystem(Memory::Allocator * allocator, Cogs::SizeType capacity) : ComponentSystemWithDataPool(allocator, capacity) {}
22
23 void update(Context * context) final;
24
25 void destroyComponent(ComponentHandle component) final;
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.
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
void destroyComponent(ComponentHandle component) final
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
Handle to a Component instance.
Definition: Component.h:67