Class for creating an OpenGL diffuse light.
More...
#include <DiffuseLight.hpp>
|
| DiffuseLight () |
| Default constructor - this is probably not the constructor you want to use - see below. More...
|
|
| DiffuseLight (glm::vec4 color, GLfloat ambientIntensity, GLfloat x, GLfloat y, GLfloat z, GLfloat diffuseIntensity) |
| Construct an OpenGL diffuse light source from parameters for ambient and diffuse lights. More...
|
|
virtual | ~DiffuseLight () |
|
void | update (GLuint ambientIntensityLocation, GLuint ambientColorLocation, GLuint diffuseIntensityLocation, GLuint directionLocation) |
| Use an OpenGL diffuse light source. More...
|
|
Class for creating an OpenGL diffuse light.
◆ DiffuseLight() [1/2]
pk::DiffuseLight::DiffuseLight |
( |
| ) |
|
|
inline |
Default constructor - this is probably not the constructor you want to use - see below.
◆ DiffuseLight() [2/2]
pk::DiffuseLight::DiffuseLight |
( |
glm::vec4 |
color, |
|
|
GLfloat |
ambientIntensity, |
|
|
GLfloat |
x, |
|
|
GLfloat |
y, |
|
|
GLfloat |
z, |
|
|
GLfloat |
diffuseIntensity |
|
) |
| |
Construct an OpenGL diffuse light source from parameters for ambient and diffuse lights.
- Parameters
-
glm::vec4 | color - the color of the ambient light. |
GLfloat | ambientIntensity - the value determining the intensity of the ambient light. |
GLfloat | x - the direction of the light on the x-axis. |
GLfloat | y - the direction of the light on the y-axis. |
GLfloat | z - the direction of the light on the z-axis. |
GLfloat | diffuseIntensity - the value determining the intensity of the diffuse light. |
◆ ~DiffuseLight()
virtual pk::DiffuseLight::~DiffuseLight |
( |
| ) |
|
|
virtual |
◆ update()
void pk::DiffuseLight::update |
( |
GLuint |
ambientIntensityLocation, |
|
|
GLuint |
ambientColorLocation, |
|
|
GLuint |
diffuseIntensityLocation, |
|
|
GLuint |
directionLocation |
|
) |
| |
Use an OpenGL diffuse light source.
- Parameters
-
GLuint | ambientIntensityLocation - a value corresponding to a memory location for ambient intensity. |
GLuint | ambientColorLocation - a value corresponding to a memory location for ambient color. |
GLuint | diffuseIntensityLocation - a value corresponding to a memory location for diffuse intensity. |
GLuint | directionLocation - a value corresponding to a memory location for the light's direction. |
◆ m_ambientIntensity
GLfloat pk::DiffuseLight::m_ambientIntensity |
|
private |
Intensity value for the ambient lighting.
◆ m_color
glm::vec4 pk::DiffuseLight::m_color |
|
private |
Color of the ambient lighting.
◆ m_diffuseIntensity
GLfloat pk::DiffuseLight::m_diffuseIntensity |
|
private |
Intensity value for the diffuse lighting.
◆ m_direction
glm::vec3 pk::DiffuseLight::m_direction |
|
private |
The direction that the light points.
The documentation for this class was generated from the following file: