-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLightManager.h
More file actions
32 lines (28 loc) · 907 Bytes
/
LightManager.h
File metadata and controls
32 lines (28 loc) · 907 Bytes
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
#pragma once
#include "CommonD.h"
#include "SpotLight.h"
#include "PointLight.h"
class LightManager
{
public:
LightManager();
void Hook();
void AddSpotLight(SpotLight spotlight);
void AddPointLight(PointLight pointlight);
void AddSpotLight(XMFLOAT3 position, XMFLOAT3 direction, XMFLOAT3 color, float radius, float angle, float intensity);
void AddPointLight(XMFLOAT3 position, XMFLOAT3 direction, XMFLOAT3 color, float radius, float intensity, bool castShadow);
void ClearLights();
void SortSpotLights();
void SortPointLights();
size_t GetSpotLightCount();
size_t GetPointLightCount();
SpotLight* GetSpotLightAt(int i);
PointLight* GetPointLightAt(int i);
static PointLight mPointLightList[60];
static SpotLight mSpotLightList[60];
static unordered_map<CEntity*, bool> mDontCull;
private:
static int mSpotLightCount;
static int mPointLightCount;
};
extern LightManager gLightManager;