Cogs.Core
EnvironmentComponent.h
1#pragma once
2
3#include "Systems/Core/CameraSystem.h"
4
5#include "Resources/Resources.h"
6
7namespace Cogs
8{
9 namespace Core
10 {
12 {
13 bool subseaSupport = false;
14 bool imageBasedLighting = false;
15 float seaLevel = 0.f;
16 float subseaTurbidityDistance = 20.f;
17 float subseaTurbidityAmount = 1.f;
18 float skyMultiplier = 1.f; // sky brightness multiplier.
19
23 TextureHandle ambientIrradiance = TextureHandle::NoHandle;
26
27 float brightness = 1;
28
29 bool isSubmerged(const CameraData* camData) const
30 {
31 return subseaSupport && (!camData->reflection && camData->inverseViewMatrix[3].z < seaLevel);
32 }
33
34 static void registerType();
35 };
36 }
37}
38
39template<> inline Cogs::StringView getName<Cogs::Core::EnvironmentComponent>() { return "EnvironmentComponent"; }
Base class for Component instances.
Definition: Component.h:143
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
Contains data describing a Camera instance and its derived data structured such as matrix data and vi...
Definition: CameraSystem.h:67
static const ResourceHandle_t NoHandle
Handle representing a default (or none if default not present) resource.