Vivid
Loading...
Searching...
No Matches
PointLightComponent.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
PointLightComponent
:
public
Component
19
{
20
private
:
21
Maths::Vec3
m_Color;
22
float
m_Intensity = 1.0f;
23
Vivid::Mesh
* m_Mesh;
24
Ref<Vivid::Shader> m_Shader;
25
26
public
:
27
PointLightComponent
() =
default
;
28
PointLightComponent
(
Maths::Vec3
color);
29
30
void
Draw(
Camera
* camera)
override
;
31
void
ImGuiRender()
override
;
32
33
void
SetColor(
Maths::Vec3
color) { m_Color = color; }
34
35
inline
Maths::Vec3
GetColor()
const
{
return
m_Color; }
36
inline
float
GetIntensity()
const
{
return
m_Intensity; }
37
ComponentType GetComponentType()
override
{
return
ComponentType::PointLightComponent; }
38
};
39
}
Camera
A class that represents the camera.
Definition:
Camera.h:25
Vivid::Component
Contains a Component.
Definition:
Component.h:15
Vivid::Mesh
Contains a Mesh.
Definition:
Mesh.h:32
Vivid::PointLightComponent
Contains a PointLightComponent.
Definition:
PointLightComponent.h:19
Vivid::Maths::Vec3
Contains a 3D vector.
Definition:
Vec.h:51
src
core
ecs
components
light
PointLightComponent.h
Generated by
1.9.6