Cogs.Core
DensityFieldComponent.h
1#pragma once
2
3#include "EntityDefinition.h"
4#include "Resources/Resources.h"
5
6#include "Foundation/ComponentModel/Component.h"
7
8#include <glm/vec3.hpp>
9
10#include <vector>
11
12namespace Cogs::Core::Volumetric
13{
15 {
16 static void registerType();
17
18 glm::vec3 extentMin = glm::vec3(-1.f);
19 glm::vec3 extentMax = glm::vec3(-1.f);
20
21 // Note, for max performance, let resolution be a multiple of 4.
22 glm::uvec3 resolution = glm::uvec3(32u);
23 std::vector<float> thresholds = { 0.5f };
24 float pointWeight = 1.f;
25 float basisStdDev = 3.5f;
26 uint32_t basisQuality = 3;
27 bool attachData = false;
28 float attachedDataScale = 1.f;
29 float attachedDataOffset = 0.f;
30 EntityPtr pointData;
31
32 bool flipOrientation = true;
33 bool innerLayerOpaque = true;
34 float layerDepthBiasStep = 1.f;
35 float opacity = 1.f;
37 };
38}
39
40template<> inline Cogs::StringView getName<Cogs::Core::Volumetric::DensityFieldComponent>() { return "VolDensityFieldComponent"; }
Base class for Component instances.
Definition: Component.h:143
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
std::shared_ptr< ComponentModel::Entity > EntityPtr
Smart pointer for Entity access.
Definition: EntityPtr.h:12