Phongo Clap RT  1.0
Simple Raytracing Renderer
Public Member Functions | Protected Attributes | Friends | List of all members
Light Class Reference

This is a base class that will be used as template when creating concretes types of light. More...

#include <Light.h>

Inheritance diagram for Light:
Inheritance graph
Collaboration diagram for Light:
Collaboration graph

Public Member Functions

 Light (ngl::Vec3 _pos, ngl::Colour _diff_col, ngl::Colour _spec_col, float _diff_int, float _spec_int, float _falloff)
 Light constructor. More...
 
 ~Light ()
 Destructor for the Light objects. More...
 

Protected Attributes

ngl::Vec3 m_pos
 Light's position vector. More...
 
ngl::Colour m_diff_col
 Diffuse colour emmited by the light. More...
 
ngl::Colour m_spec_col
 Specular colour emmited by the light. More...
 
float m_diff_int
 Diffuse contribution intensity. It will multiply the diffuse colour when doing the Phong calculations More...
 
float m_spec_int
 Specular contribution intensity. Will multiply the specular colour when doing the Phong calculations More...
 
float m_falloff
 Controlls the falloff of the light. Higher values will accentuate the decay. More...
 

Friends

class Renderer
 

Detailed Description

This is a base class that will be used as template when creating concretes types of light.

Author
Ramon Blanquer
Todo:
Implement Kd, Ka and Ks on the sphere

Definition at line 18 of file Light.h.

Constructor & Destructor Documentation

Light::Light ( ngl::Vec3  _pos,
ngl::Colour  _diff_col,
ngl::Colour  _spec_col,
float  _diff_int,
float  _spec_int,
float  _falloff 
)
inline

Light constructor.

Parameters
[in]_posLight's position.
[in]_diff_colDiffuse colour emitted by the light.
[in]_spec_colSpecular colour emmited by the light.
[in]_diff_intSets the intensity of the diffuse colour emission.
[in]_spec_intSets the intensity of the specular emission.
[in]_falloffControlls how the light decays.

Definition at line 30 of file Light.h.

35  : m_pos(_pos), m_diff_col(_diff_col), m_spec_col(_spec_col),
36  m_diff_int(_diff_int), m_spec_int(_spec_int), m_falloff(_falloff) {}
float m_diff_int
Diffuse contribution intensity. It will multiply the diffuse colour when doing the Phong calculations...
Definition: Light.h:61
ngl::Colour m_diff_col
Diffuse colour emmited by the light.
Definition: Light.h:53
ngl::Vec3 m_pos
Light's position vector.
Definition: Light.h:49
float m_falloff
Controlls the falloff of the light. Higher values will accentuate the decay.
Definition: Light.h:69
ngl::Colour m_spec_col
Specular colour emmited by the light.
Definition: Light.h:57
float m_spec_int
Specular contribution intensity. Will multiply the specular colour when doing the Phong calculations ...
Definition: Light.h:65
Light::~Light ( )
inline

Destructor for the Light objects.

Definition at line 40 of file Light.h.

40 {}

Friends And Related Function Documentation

friend class Renderer
friend

Definition at line 43 of file Light.h.

Member Data Documentation

ngl::Colour Light::m_diff_col
protected

Diffuse colour emmited by the light.

Definition at line 53 of file Light.h.

float Light::m_diff_int
protected

Diffuse contribution intensity. It will multiply the diffuse colour when doing the Phong calculations

Definition at line 61 of file Light.h.

float Light::m_falloff
protected

Controlls the falloff of the light. Higher values will accentuate the decay.

Definition at line 69 of file Light.h.

ngl::Vec3 Light::m_pos
protected

Light's position vector.

Definition at line 49 of file Light.h.

ngl::Colour Light::m_spec_col
protected

Specular colour emmited by the light.

Definition at line 57 of file Light.h.

float Light::m_spec_int
protected

Specular contribution intensity. Will multiply the specular colour when doing the Phong calculations

Definition at line 65 of file Light.h.


The documentation for this class was generated from the following file: