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 virtual bool IsSpotLight3D() const;
21
22 void SetColor(glm::vec4 color);
23 glm::vec4 GetColor() const;
24
25 void SetIntensity(float intensity);
26 float GetIntensity() const;
27
28 void SetLightingDomain(LightingDomain domain);
29 LightingDomain GetLightingDomain() const;
30
31 void SetCastShadows(bool castShadows);
32 bool ShouldCastShadows() const;
33
34 uint8_t GetLightingChannels() const;
35 void SetLightingChannels(uint8_t channels);
36
37protected:
38
39 glm::vec4 mColor = { 1.0f, 1.0f, 1.0f, 1.0f };
40 float mIntensity = 1.0f;
42 bool mCastShadows = true;
43 uint8_t mLightingChannels = 0x01;
44};
LightingDomain
Definition EngineTypes.h:176
#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:140
virtual void GatherProperties(std::vector< Property > &outProps) override
Definition Node3d.cpp:145
virtual bool IsLight3D() const
Definition Node.cpp:1595