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
9namespace Vivid
10{
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;
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}
A class that represents the camera.
Definition: Camera.h:25
Contains a Component.
Definition: Component.h:15
Contains a Mesh.
Definition: Mesh.h:32
Contains a PointLightComponent.
Contains a 3D vector.
Definition: Vec.h:51