![]() |
Jopnal Engine
alpha 0.4
Simple Component Based 2D/3D Game Engine
|
Container for lights. More...
#include <LightSource.hpp>
Public Types | |
typedef std::vector< const LightSource * > | ContainerType |
Public Member Functions | |
LightContainer () | |
Constructor. More... | |
bool | empty () const |
Check is this container is empty. More... | |
void | clear () |
Clear this container. More... | |
void | sendToShader (ShaderProgram &shader, const Drawable &drawable, const glm::mat4 &viewMatrix) const |
Send the contained lights to shader. More... | |
ContainerType & | operator[] (const LightSource::Type type) |
Access the individual containers for each light type. More... | |
const ContainerType & | operator[] (const LightSource::Type type) const |
Access the individual containers for each light type. More... | |
Container for lights.
Meant to be passed to Drawable::draw().
Definition at line 319 of file LightSource.hpp.
typedef std::vector<const LightSource*> jop::LightContainer::ContainerType |
Definition at line 323 of file LightSource.hpp.
jop::LightContainer::LightContainer | ( | ) |
Constructor.
void jop::LightContainer::clear | ( | ) |
Clear this container.
bool jop::LightContainer::empty | ( | ) | const |
Check is this container is empty.
ContainerType& jop::LightContainer::operator[] | ( | const LightSource::Type | type | ) |
Access the individual containers for each light type.
type | The light type |
const ContainerType& jop::LightContainer::operator[] | ( | const LightSource::Type | type | ) | const |
Access the individual containers for each light type.
type | The light type |
void jop::LightContainer::sendToShader | ( | ShaderProgram & | shader, |
const Drawable & | drawable, | ||
const glm::mat4 & | viewMatrix | ||
) | const |
Send the contained lights to shader.
shader | The shader to send the lights to |
drawable | The drawable |
viewMatrix | The current view matrix |