Vivid
Loading...
Searching...
No Matches
DirectionalLightComponent.h
1
#pragma once
2
3
#include "core/ecs/components/model/Mesh.h"
4
#include "core/renderer/shapes/Shape.h"
5
6
#include "core/ecs/Component.h"
7
#include "common/maths/Vec.h"
8
9
namespace
Vivid
10
{
18
class
DirectionalLightComponent
:
public
Component
19
{
20
private
:
21
Maths::Vec3
m_LightColor =
Maths::Vec3
(1.0f, 1.0f, 1.0f);
22
float
m_Intensity = 1.0f;
23
Maths::Vec3
m_Direction =
Maths::Vec3
(0.0f, -1.0f, 0.0f);
24
25
public
:
26
DirectionalLightComponent
() =
default
;
27
DirectionalLightComponent
(
Maths::Vec3
lightColor);
28
29
void
Draw(
Camera
* camera)
override
;
30
void
ImGuiRender()
override
;
31
32
void
SetDirection(
Maths::Vec3
direction) { m_Direction = direction; }
33
34
inline
Maths::Vec3
GetLightColor()
const
{
return
m_LightColor; }
35
inline
float
GetIntensity()
const
{
return
m_Intensity; }
36
inline
Maths::Vec3
GetDirection()
const
{
return
m_Direction; }
37
ComponentType GetComponentType()
override
{
return
ComponentType::DirectionalLightComponent; }
38
};
39
}
Camera
A class that represents the camera.
Definition:
Camera.h:25
Vivid::Component
Contains a Component.
Definition:
Component.h:15
Vivid::DirectionalLightComponent
Definition:
DirectionalLightComponent.h:19
Vivid::Maths::Vec3
Contains a 3D vector.
Definition:
Vec.h:51
src
core
ecs
components
light
DirectionalLightComponent.h
Generated by
1.9.6