Radium Engine  1.5.0
SpotLight.cpp
1 #include <Engine/Data/RenderParameters.hpp>
2 #include <Engine/Scene/SpotLight.hpp>
3 
4 namespace Ra {
5 namespace Engine {
6 namespace Scene {
7 SpotLight::SpotLight( Entity* entity, const std::string& name ) :
8  Light( entity, Light::SPOT, name ) {
9  getRenderParameters().addParameter( "light.spot.position", m_position );
10  getRenderParameters().addParameter( "light.spot.direction", m_direction );
11  getRenderParameters().addParameter( "light.spot.innerAngle", m_innerAngle );
12  getRenderParameters().addParameter( "light.spot.outerAngle", m_outerAngle );
13  getRenderParameters().addParameter( "light.spot.attenuation.constant", m_attenuation.constant );
14  getRenderParameters().addParameter( "light.spot.attenuation.linear", m_attenuation.linear );
15  getRenderParameters().addParameter( "light.spot.attenuation.quadratic",
16  m_attenuation.quadratic );
17 }
18 
19 std::string SpotLight::getShaderInclude() const {
20  return "Spot";
21 }
22 
23 } // namespace Scene
24 } // namespace Engine
25 } // namespace Ra
Definition: Cage.cpp:3