Cogs.Core
DataSet2DComponent.h
1#pragma once
2#include <vector>
3#include "Components/Core/DynamicComponent.h"
4
5namespace Cogs
6{
7 namespace Core
8 {
9
12 {
13 public:
15 sizeI(0),
16 sizeJ(0),
17 hasData(false),
18 minValue(0.f),
19 maxValue(0.f)
20 {}
21
22 void update();
23
24 static void registerType();
25
26 std::vector<float> data;
27 int sizeI;
28 int sizeJ;
29 bool hasData;
30 float minValue;
31 float maxValue;
32 };
33
34 } // namespace Core
35} // namespace Cogs
36
37template<> inline Cogs::StringView getName<Cogs::Core::DataSet2DComponent>() { return "DataSet2DComponent"; }
Base class for components implementing dynamic behavior.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
float minValue
Minimum value in dataset, updated by component.
float maxValue
Maximum value in dataset, updated by component.
std::vector< float > data
Values of the dataset, should be of size layout.x*layout.y.
int sizeI
2D layout of dataset.
int sizeJ
2D layout of dataset.
bool hasData
True if data and layout contains coherent data, updated by component.