Jopnal Engine  alpha 0.4
Simple Component Based 2D/3D Game Engine
Public Types | Public Member Functions | List of all members
jop::LightContainer Class Reference

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...
 
ContainerTypeoperator[] (const LightSource::Type type)
 Access the individual containers for each light type. More...
 
const ContainerTypeoperator[] (const LightSource::Type type) const
 Access the individual containers for each light type. More...
 

Detailed Description

Container for lights.

Meant to be passed to Drawable::draw().

Definition at line 319 of file LightSource.hpp.

Member Typedef Documentation

typedef std::vector<const LightSource*> jop::LightContainer::ContainerType

Definition at line 323 of file LightSource.hpp.

Constructor & Destructor Documentation

jop::LightContainer::LightContainer ( )

Constructor.

Member Function Documentation

void jop::LightContainer::clear ( )

Clear this container.

bool jop::LightContainer::empty ( ) const

Check is this container is empty.

Returns
True if empty
ContainerType& jop::LightContainer::operator[] ( const LightSource::Type  type)

Access the individual containers for each light type.

Parameters
typeThe light type
Returns
Reference to the container
const ContainerType& jop::LightContainer::operator[] ( const LightSource::Type  type) const

Access the individual containers for each light type.

Parameters
typeThe light type
Returns
Reference to the container
void jop::LightContainer::sendToShader ( ShaderProgram shader,
const Drawable drawable,
const glm::mat4 &  viewMatrix 
) const

Send the contained lights to shader.

Parameters
shaderThe shader to send the lights to
drawableThe drawable
viewMatrixThe current view matrix

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