Cogs.Core
OctDummyProviderSystem.h
1#pragma once
2
3#include "Scene/GetBounds.h"
4#include "Systems/ComponentSystem.h"
5
6#include "../Components/VolOctDummyProviderComponent.h"
7
8#include "Rendering/Common.h"
9
10#include "Foundation/Memory/MemoryBuffer.h"
11
12#include <glm/glm.hpp>
13
14#include <unordered_map>
15#include <memory.h>
16
17namespace Cogs
18{
19 namespace Core
20 {
21 namespace Volumetric
22 {
23
24 struct OctSystem;
25
27 {
28 float radius;
29 std::vector<glm::vec3> positions; // persistent copy of point positions.
30 std::vector<TileResponse*> responses;
31
32 bool tasksRunning = false;
33 };
34
36 {
37 size_t pointsSeen = 0;
38 std::shared_ptr<OctDummyPersistent> persistent;
39 };
40
42 : public ComponentSystemWithDataPool<VolOctDummyProviderComponent, OctDummyProviderData>
43 {
44 OctDummyProviderSystem(Memory::Allocator * allocator, SizeType capacity) : ComponentSystemWithDataPool(allocator, capacity) {}
45
46 void initialize(Context * context) override;
47
48 void preUpdate(Context * context) override;
49
50 void update(Context * context) override;
51
52 struct OctSystem* octtreeSystem = nullptr;
53 };
54
55 }
56 }
57}
Context * context
Pointer to the Context instance the system lives in.
void update()
Updates the system state to that of the current frame.
void preUpdate()
Run the pre-update method of the system.
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
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
ComponentIndex SizeType
Type used to track the size of pools.
Definition: Component.h:19
void initialize(Context *context) override
Initialize the system.