Cogs.Core
ImageType.h
1#pragma once
2
3#include "Foundation/Geometry/Glm.hpp"
4#include "Foundation/Reflection/Name.h"
5
6#include <glm/vec3.hpp>
7
8namespace Cogs
9{
10 namespace Core
11 {
12 enum struct ImageType : int
13 {
14 None = 0,
15 CheckerBoard,
16 ColorfulCheckerBoard,
17 Dirt,
18 Steel,
19 ColorCube,
20 Sky,
21 SkyCube,
22 SkyRadiance,
23 SkyIrradiance,
24 SkyAmbientIrradiance,
25 SubseaRadiance,
26 GradientRainbow,
27 GradientHeat
28 };
29
31 {
32 glm::vec3 sunDirection = glm::vec3(0, 0, 1);
33 glm::vec3 sunIrradiance = glm::vec3(1, 1, 1);
34 ImageType type = ImageType::None;
35 uint32_t width = 256;
36 uint32_t height = 256;
37 uint32_t layers = 1;
38 bool hdr = false;
39
40 constexpr size_t hash(size_t hashValue = Cogs::hash()) const {
41 hashValue = Cogs::hash(sunDirection, hashValue);
42 hashValue = Cogs::hash(sunIrradiance, hashValue);
43 hashValue = Cogs::hash(type, hashValue);
44 hashValue = Cogs::hash(width, hashValue);
45 hashValue = Cogs::hash(height, hashValue);
46 hashValue = Cogs::hash(hdr, hashValue);
47
48 return hashValue;
49 }
50 };
51
52 }
53}
54
55template<> inline Cogs::StringView getName<Cogs::Core::ImageType>() { return "ImageType"; }
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
constexpr size_t hash() noexcept
Simple getter function that returns the initial value for fnv1a hashing.
Definition: HashFunctions.h:62