Track::Lighting Class Reference

Defines lighting and atmospheric effects for a track. More...

#include <Lighting.h>

List of all members.

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 FogSettingsget_fog () const
 Get the fog settings.
bool operator!= (const Lighting &other) const

Private Attributes

std::vector< LightSettingsm_lights
FogSettings m_fog
float m_ambient_light [4]


Detailed Description

Defines lighting and atmospheric effects for a track.

Definition at line 65 of file Lighting.h.


Constructor & Destructor Documentation

Track::Lighting::Lighting (  ) 

Definition at line 103 of file Lighting.cpp.

Track::Lighting::Lighting ( std::istream &  in  ) 

Create from a serialised record.

Definition at line 122 of file Lighting.cpp.


Member Function Documentation

const float * Track::Lighting::get_ambient_light (  )  const

Get the ambient light colour.

Definition at line 198 of file Lighting.cpp.

const FogSettings & Track::Lighting::get_fog (  )  const

Get the fog settings.

Definition at line 208 of file Lighting.cpp.

const std::vector< LightSettings > & Track::Lighting::get_lights (  )  const

Get the lights' settings.

Definition at line 185 of file Lighting.cpp.

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]  ) 

Set the ambient light colour.

Definition at line 190 of file Lighting.cpp.

void Track::Lighting::set_fog ( const FogSettings fog  ) 

Set the fog settings.

Definition at line 203 of file Lighting.cpp.

void Track::Lighting::set_lights ( const std::vector< LightSettings > &  lights  ) 

Set the lights' settings.

Definition at line 180 of file Lighting.cpp.


Member Data Documentation

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.


The documentation for this class was generated from the following files:
Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:18 2010 by Doxygen version 1.4.7 for Racer version svn335.