-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPointLight.h
More file actions
24 lines (22 loc) · 1004 Bytes
/
Copy pathPointLight.h
File metadata and controls
24 lines (22 loc) · 1004 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
#pragma once
#include "Light.h"
#include "OmniShadowMap.h"
#include <vector>
class PointLight :public Light
{
public:
//Constructor
PointLight();
PointLight(glm::vec4 AmbientLightParams, GLfloat DiffuseIntensity, GLuint SMapWidth, GLuint SMapHeight, glm::vec3 LightPositionParams, glm::vec3 EquationCoeffs,GLfloat nPlane,GLfloat fPlane);
//Enables light during rendering and passes lighting information to shaders
void UseLight(GLuint AmbientColorLocation, GLuint AmbientIntensityLocation, GLuint DiffuseIntensiyUniformLocation, GLuint LightPositionUniformLocation, GLuint CoeffAUniformLocation, GLuint CoeffBUniformLocation, GLuint CoeffCUniformLocation);
virtual std::vector<glm::mat4> CalculateLightMatrices();
virtual GLfloat GetFarPlane();
virtual glm::vec3 GetLightPosition();
protected:
//Light direction vector
glm::vec3 LightPosition;
//a,b,c are coeffs of x^2,x,and the constant respectively.These are for attenuation of the light
GLfloat a, b, c;
GLfloat NearPlane, FarPlane;
};