Cogs.Core
Extensions
Volumetric
Source
Tasks
DensityFieldTask.h
1
#pragma once
2
3
#include "Resources/Resources.h"
4
#include "Resources/Buffer.h"
5
6
#include "Foundation/Memory/MemoryBuffer.h"
7
8
namespace
Cogs::Core
9
{
10
class
Context;
11
}
12
13
namespace
Cogs::Core::Volumetric
14
{
15
struct
DensityFieldComponent;
16
struct
DensityFieldData;
17
struct
PointDataData;
18
19
struct
Point
20
{
21
glm::uvec3 ix;
22
float
data;
23
};
24
25
struct
DensityFieldTaskData
26
{
27
Context
* context;
28
std::vector<float> thresholds;
29
glm::uvec3 resolution;
30
bool
dataAttached;
31
float
densityWeight;
32
float
boxFilterWidth;
33
uint32_t boxFilterIterations;
34
glm::vec3 extentMin;
35
glm::vec3 extentMax;
36
37
std::vector<float> rData;
38
std::vector<glm::vec3> rPositions;
39
float
attachedDataScale = 1.f;
40
float
attachedDataOffset = 0.f;
41
42
Memory::TypedBuffer<float>
densityField;
43
Memory::TypedBuffer<float>
densityFieldOut;
44
Memory::TypedBuffer<float>
dataField;
45
Memory::TypedBuffer<float>
dataFieldOut;
46
std::vector<Point> points;
47
48
MeshHandle
mesh;
49
50
void
update(
Context
* context,
51
DensityFieldComponent
&fieldComp,
52
DensityFieldData
& fieldData,
53
BufferView<glm::vec3>
positions,
54
BufferView<float>
data);
55
};
56
57
struct
DensityFieldTask
58
{
59
std::shared_ptr<DensityFieldTaskData> persistentData;
60
void
operator()();
61
};
62
}
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Memory::TypedBuffer
Definition:
MemoryBuffer.h:196
Cogs::Core
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
Definition:
ComponentFunctions.h:10
Cogs::Core::BufferView
BufferView provides a typed, reference-counted, span of an underlying buffer resource.
Definition:
Buffer.h:118
Cogs::Core::ResourceHandle_t< Mesh >
Cogs::Core::Volumetric::DensityFieldComponent
Definition:
DensityFieldComponent.h:15
Cogs::Core::Volumetric::DensityFieldData
Definition:
DensityFieldSystem.h:18
Cogs::Core::Volumetric::DensityFieldTaskData
Definition:
DensityFieldTask.h:26
Cogs::Core::Volumetric::DensityFieldTask
Definition:
DensityFieldTask.h:58
Cogs::Core::Volumetric::Point
Definition:
DensityFieldTask.h:20
Generated by
1.9.6