Gamedev Framework (gf)  0.20.0
A C++17 framework for 2D games
Classes | Public Member Functions | List of all members
gf::LightSystem Class Reference

A light system. More...

#include <gf/LightSystem.h>

Inheritance diagram for gf::LightSystem:
Inheritance graph
[legend]

Public Member Functions

 LightSystem (Vector2i size)
 
void setAmbientColor (const Color4f &color)
 
LightId addLightShape (LightShape &shape)
 
LightId addLightPoint (LightPointEmission &light)
 
void removeLight (LightId id)
 
void draw (RenderTarget &target, const RenderStates &states) override
 Draw the object to a render target. More...
 
void dump ()
 
- Public Member Functions inherited from gf::Drawable
virtual ~Drawable ()
 Virtual desctructor. More...
 

Detailed Description

A light system.

Constructor & Destructor Documentation

◆ LightSystem()

gf::LightSystem::LightSystem ( Vector2i  size)

Member Function Documentation

◆ addLightPoint()

LightId gf::LightSystem::addLightPoint ( LightPointEmission light)

◆ addLightShape()

LightId gf::LightSystem::addLightShape ( LightShape shape)

◆ draw()

void gf::LightSystem::draw ( RenderTarget target,
const RenderStates states 
)
overridevirtual

Draw the object to a render target.

This is a pure virtual function that has to be implemented by the derived class to define how the drawable should be drawn.

Parameters
targetRender target to draw to
statesCurrent render states

Implements gf::Drawable.

◆ dump()

void gf::LightSystem::dump ( )

◆ removeLight()

void gf::LightSystem::removeLight ( LightId  id)

◆ setAmbientColor()

void gf::LightSystem::setAmbientColor ( const Color4f color)
inline