Polyphase Game Engine
Loading...
Searching...
No Matches
Light3d.h
Go to the documentation of this file.
1#pragma once
2
3#include "Node3d.h"
4
6{
7public:
8
10
11 Light3D();
12 ~Light3D();
13
14 virtual const char* GetTypeName() const override;
15 virtual void GatherProperties(std::vector<Property>& outProps) override;
16
17 virtual bool IsLight3D() const;
18 virtual bool IsPointLight3D() const = 0;
19 virtual bool IsDirectionalLight3D() const = 0;
20
21 void SetColor(glm::vec4 color);
22 glm::vec4 GetColor() const;
23
24 void SetIntensity(float intensity);
25 float GetIntensity() const;
26
27 void SetLightingDomain(LightingDomain domain);
28 LightingDomain GetLightingDomain() const;
29
30 void SetCastShadows(bool castShadows);
31 bool ShouldCastShadows() const;
32
33 uint8_t GetLightingChannels() const;
34 void SetLightingChannels(uint8_t channels);
35
36protected:
37
38 glm::vec4 mColor = { 1.0f, 1.0f, 1.0f, 1.0f };
39 float mIntensity = 1.0f;
41 bool mCastShadows = true;
42 uint8_t mLightingChannels = 0x01;
43};
LightingDomain
Definition EngineTypes.h:165
#define POLYPHASE_API
Definition PolyphaseAPI.h:31
Definition Light3d.h:6
virtual bool IsPointLight3D() const =0
DECLARE_OBJECT(Light3D, Node3D)
virtual bool IsDirectionalLight3D() const =0
Definition Node3d.h:14
virtual const char * GetTypeName() const override
Definition Node3d.cpp:119
virtual void GatherProperties(std::vector< Property > &outProps) override
Definition Node3d.cpp:124
virtual bool IsLight3D() const
Definition Node.cpp:1541