-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLight.h
More file actions
41 lines (34 loc) · 1.36 KB
/
Copy pathLight.h
File metadata and controls
41 lines (34 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// ===========================================================================
/// <summary>
/// Light.h
/// DirectXIntroduction
/// created by Mehrdad Soleimanimajd on 01.09.2019
/// </summary>
/// <created>ʆϒʅ, 01.09.2019</created>
/// <changed>ʆϒʅ, 04.07.2023</changed>
// ===========================================================================
#ifndef LIGHT_H
#define LIGHT_H
#include <DirectXMath.h>
// lightening wrapper
//-- diffuse lighting of type directional lighting:
//- similar to the sun light illuminated from a great distance away
//- using its direction the amount of light is determinable
//- unlike ambient lighting, no effect of surfaces it doesn't directly touch
//- requirements: direction and a normal polygon vector implemented in both pixel and vertex shader
class DiffuseLight
{
private:
DirectX::XMFLOAT4 diffuseColour;
DirectX::XMFLOAT3 diffuseDirection;
bool initialized; // true if initialization was successful
public:
DiffuseLight (void);
const bool& isInitialized (void); // get the initialized state
void setColour (float, float, float, float); // set diffuse light colour
void setDirection (float, float, float); // set diffuse light direction
DirectX::XMFLOAT4 getColour (void); // get diffuse light colour
DirectX::XMFLOAT3 getDirection (void); // get diffuse light direction
};
#endif // !LIGHT_H