Cogs.Core
Extensions
Volumetric
Source
Systems
DensityFieldSystem.h
1
#pragma once
2
3
#include <memory.h>
4
#include "Systems/ComponentSystem.h"
5
#include "../Components/DensityFieldComponent.h"
6
7
namespace
Cogs
8
{
9
namespace
Core
10
{
11
namespace
Volumetric
12
{
13
14
struct
DensityFieldTaskData;
15
16
17
struct
DensityFieldData
18
{
19
std::shared_ptr<DensityFieldTaskData> persistentData;
20
glm::uvec3 resolution;
21
uint8_t pointPositionGeneration = (uint8_t)-1;
22
uint8_t pointDataGeneration = (uint8_t)-1;
23
bool
needsUpdate =
false
;
24
};
25
26
27
struct
DensityFieldSystem
28
:
public
ComponentSystemWithDataPool
<DensityFieldComponent, DensityFieldData>
29
{
30
public
:
31
DensityFieldSystem
(
Memory::Allocator
* allocator,
SizeType
capacity) :
ComponentSystemWithDataPool
(allocator, capacity) {}
32
33
void
update
(
Context
*
context
)
override
;
34
35
private
:
36
};
37
38
}
39
}
40
}
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::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::DensityFieldData
Definition:
DensityFieldSystem.h:18
Cogs::Core::Volumetric::DensityFieldSystem
Definition:
DensityFieldSystem.h:29
Generated by
1.9.6