-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLight.cpp
More file actions
56 lines (41 loc) · 1.17 KB
/
Copy pathLight.cpp
File metadata and controls
56 lines (41 loc) · 1.17 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// ===========================================================================
/// <summary>
/// Light.cpp
/// DirectXIntroduction
/// created by Mehrdad Soleimanimajd on 01.09.2019
/// </summary>
/// <created>ʆϒʅ, 01.09.2019</created>
/// <changed>ʆϒʅ, 04.07.2023</changed>
// ===========================================================================
#include "Light.h"
DiffuseLight::DiffuseLight () : initialized (false)
{
diffuseColour = DirectX::XMFLOAT4 (0.0f, 0.0f, 0.0f, 1.0f);
diffuseDirection = DirectX::XMFLOAT3 (0.0f, 0.0f, 0.0f);
initialized = true;
};
const bool& DiffuseLight::isInitialized (void)
{
return initialized;
};
void DiffuseLight::setColour (float red, float green, float blue, float alpha)
{
diffuseColour = DirectX::XMFLOAT4 {red, green, blue, alpha};
};
void DiffuseLight::setDirection (float x, float y, float z)
{
diffuseDirection = DirectX::XMFLOAT3 {x, y, z};
};
DirectX::XMFLOAT4 DiffuseLight::getColour (void)
{
return diffuseColour;
};
DirectX::XMFLOAT3 DiffuseLight::getDirection (void)
{
return diffuseDirection;
};
//const bool& DiffuseLight::isInitialized ( void )
//{
// return initialized;
//};