-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPointLight.h
More file actions
37 lines (27 loc) · 1000 Bytes
/
Copy pathPointLight.h
File metadata and controls
37 lines (27 loc) · 1000 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
32
33
34
35
36
#pragma once
#include "Light.h"
#include <vector>
#include "OmniShadowMap.h"
class PointLight :
public Light
{
public:
PointLight();
PointLight(GLuint shadowWidth, GLuint shadowHeight,
GLfloat near, GLfloat far,
GLfloat red, GLfloat green, GLfloat blue,
GLfloat aIntensity, GLfloat dIntensity,
GLfloat xPos, GLfloat yPos, GLfloat zPos,
GLfloat con, GLfloat lin, GLfloat exp);
void UseLight(GLuint ambientIntensityLocation, GLuint ambientColourLocation,
GLuint diffuseIntensityLocation, GLuint positionLocation,
GLuint constantLocation, GLuint linearLocation, GLuint exponentLocation);
std::vector<glm::mat4> CalculateLightTransform();
GLfloat GetFarPlane();
glm::vec3 GetPosition();
~PointLight();
protected:
glm::vec3 position;
GLfloat constant, linear, exponent; //used for attenuation - i.e. how the light drops off over a distance. ax2 + bx + c - Here a = exponent, b = linear, c = constant
GLfloat farPlane; //how far away our camera can see
};