-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLight.h
34 lines (28 loc) · 1010 Bytes
/
Light.h
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
#ifndef _LIGHT_H_
#define _LIGHT_H_
//GLM
#include "GLInclude.h"
#include <fstream>
#include <sstream>
////////////////////////////////////////////////////////////////////////////////
/// @brief Light for scene
////////////////////////////////////////////////////////////////////////////////
class Light{
public:
////////////////////////////////////////////////////////////////////////////
/// @brief Constructor for light
/// @param ifs Input stream for reading file data
Light(std::ifstream& ifs);
////////////////////////////////////////////////////////////////////////////
/// @brief Draws lighting
/// @param _program Shader program for shading
void Draw(GLuint _program);
private:
bool positional; //< Type of light (1 = pos, 0 = dirc)
glm::vec3 position; //< Location in space
glm::vec3 direction; //< Direction of light
glm::vec3 ambientColor; //< Ambient color
glm::vec3 diffuseColor; //< Diffuse color
glm::vec3 specularColor; //< Specular color
};
#endif