Cogs.Core
Extensions
Volumetric
Source
Systems
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
17
namespace
Cogs
18
{
19
namespace
Core
20
{
21
namespace
Volumetric
22
{
23
24
struct
OctSystem;
25
26
struct
OctDummyPersistent
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
35
struct
OctDummyProviderData
36
{
37
size_t
pointsSeen = 0;
38
std::shared_ptr<OctDummyPersistent> persistent;
39
};
40
41
struct
OctDummyProviderSystem
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
}
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::ComponentSystemBase::preUpdate
void preUpdate()
Run the pre-update method of the system.
Definition:
ComponentSystem.h:57
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::Memory::Allocator
Base allocator implementation.
Definition:
Allocator.h:30
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::Volumetric::OctDummyPersistent
Definition:
OctDummyProviderSystem.h:27
Cogs::Core::Volumetric::OctDummyProviderData
Definition:
OctDummyProviderSystem.h:36
Cogs::Core::Volumetric::OctDummyProviderSystem
Definition:
OctDummyProviderSystem.h:43
Cogs::Core::Volumetric::OctDummyProviderSystem::initialize
void initialize(Context *context) override
Initialize the system.
Definition:
OctDummyProviderSystem.cpp:117
Cogs::Core::Volumetric::OctSystem
Definition:
OctSystem.h:116
Generated by
1.9.6