Cogs.Core
RadialLogComponent.h
1#pragma once
2
3#include "Components/Core/DynamicComponent.h"
4
5#include "Resources/Buffer.h"
6
7namespace Cogs::Core
8{
10 {
11 static void registerType();
13 void initialize(Context * context);
14 void update();
15
16 Context* context = nullptr;
17
23
26
27 bool normalize_range = true;
28 float r_min = 0.0f;
29 float r_max = 1.0f;
30
31 float high_side_size = 0.05f;
32 uint32_t high_side_index = 0;
33 glm::vec4 high_side_color = glm::vec4(1, 1, 34.0f / 255.0f, 1);
34
35 private:
36 void generateHighSide();
37
38 float lr_min = -1.0f;
39 float lr_max = -1.0f;
40
42 EntityPtr highSide;
43 };
44}// namespace ...
45
46template<> inline Cogs::StringView getName<Cogs::Core::RadialLogComponent>() { return "RadialLogComponent"; }
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Base class for components implementing dynamic behavior.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
std::shared_ptr< ComponentModel::Entity > EntityPtr
Smart pointer for Entity access.
Definition: EntityPtr.h:12
BufferView provides a typed, reference-counted, span of an underlying buffer resource.
Definition: Buffer.h:118
float r_max
Manual max radius for gradient.
glm::vec4 high_side_color
Color for drawing high side indicator.
uint32_t high_side_index
Index of sector to use for finding radius.
BufferView< glm::vec3 > positions
Center position for each sample.
BufferView< float > azimuths
Clockwise rotation from grid north in radians, per sample.
bool normalize_range
Automatically use min/max radius (from buffer) with gradient.
BufferView< float > radiuses
One radius per sector (sectors = radiuses/samples).
BufferView< glm::vec4 > colors
One color per radius value, only used if set.
BufferView< float > indexes
Measured depth per sample.
float high_side_size
Height of high side indicator.
BufferView< glm::vec3 > gradient
Color gradient.
BufferView< float > inclinations
Positive values interpreted as down, per sample.
float r_min
Manual min radius for gradient.