#include <Lighting.h>
Public Member Functions | |
Lighting () | |
Lighting (std::istream &in) | |
Create from a serialised record. | |
void | prepare_render () const |
Set up lighting and fog for a render. | |
void | initalise () const |
Initalise lighting and fog in OpenGL. | |
void | set_lights (const std::vector< LightSettings > &lights) |
Set the lights' settings. | |
const std::vector< LightSettings > & | get_lights () const |
Get the lights' settings. | |
void | set_ambient (float colour[4]) |
Set the ambient light colour. | |
const float * | get_ambient_light () const |
Get the ambient light colour. | |
void | set_fog (const FogSettings &fog) |
Set the fog settings. | |
const FogSettings & | get_fog () const |
Get the fog settings. | |
bool | operator!= (const Lighting &other) const |
Private Attributes | |
std::vector< LightSettings > | m_lights |
FogSettings | m_fog |
float | m_ambient_light [4] |
Definition at line 65 of file Lighting.h.
Track::Lighting::Lighting | ( | ) |
Definition at line 103 of file Lighting.cpp.
Track::Lighting::Lighting | ( | std::istream & | in | ) |
const float * Track::Lighting::get_ambient_light | ( | ) | const |
const FogSettings & Track::Lighting::get_fog | ( | ) | const |
const std::vector< LightSettings > & Track::Lighting::get_lights | ( | ) | const |
void Track::Lighting::initalise | ( | ) | const |
Initalise lighting and fog in OpenGL.
Should be called before rendering any frame.
Definition at line 141 of file Lighting.cpp.
bool Track::Lighting::operator!= | ( | const Lighting & | other | ) | const |
Definition at line 213 of file Lighting.cpp.
void Track::Lighting::prepare_render | ( | ) | const |
Set up lighting and fog for a render.
Should be called for each render, between setting the matrices and drawing geometry.
Definition at line 169 of file Lighting.cpp.
void Track::Lighting::set_ambient | ( | float | colour[4] | ) |
void Track::Lighting::set_fog | ( | const FogSettings & | fog | ) |
void Track::Lighting::set_lights | ( | const std::vector< LightSettings > & | lights | ) |
float Track::Lighting::m_ambient_light[4] [private] |
Definition at line 110 of file Lighting.h.
FogSettings Track::Lighting::m_fog [private] |
Definition at line 109 of file Lighting.h.
std::vector<LightSettings> Track::Lighting::m_lights [private] |
Definition at line 108 of file Lighting.h.
Generated at Mon Sep 6 00:41:18 2010 by Doxygen version 1.4.7 for Racer version svn335.