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