Radium Engine  1.5.20
Loading...
Searching...
No Matches
PointLight.cpp
1#include <Engine/Scene/PointLight.hpp>
2
3#include <Engine/Data/RenderParameters.hpp>
4
5namespace Ra {
6namespace Engine {
7namespace Scene {
8PointLight::PointLight( Entity* entity, const std::string& name ) :
9 Light( entity, Light::POINT, name ) {
10 getRenderParameters().setVariable( "light.point.position", m_position );
11 getRenderParameters().setVariable( "light.point.attenuation.constant", m_attenuation.constant );
12 getRenderParameters().setVariable( "light.point.attenuation.linear", m_attenuation.linear );
13 getRenderParameters().setVariable( "light.point.attenuation.quadratic",
14 m_attenuation.quadratic );
15}
16
17std::string PointLight::getShaderInclude() const {
18 return "Point";
19}
20
21} // namespace Scene
22} // namespace Engine
23} // namespace Ra
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3