Radium Engine  1.5.0
Light.cpp
1 #include <Engine/Scene/Light.hpp>
2 
3 #include <Engine/Data/RenderParameters.hpp>
4 #include <Engine/RadiumEngine.hpp>
5 
6 namespace Ra {
7 namespace Engine {
8 namespace Scene {
9 Light::Light( Scene::Entity* entity, const LightType& type, const std::string& name ) :
10  Component( name, entity ), m_type( type ) {
11  m_params.addParameter( "light.type", m_type );
12  m_params.addParameter( "light.color", m_color );
13 }
14 
16  params.mergeReplaceParameters( m_params );
17 }
18 
20  // Nothing to do.
21 }
22 
23 std::string Light::getShaderInclude() const {
24  return {};
25 }
26 
27 } // namespace Scene
28 } // namespace Engine
29 } // namespace Ra
void addParameter(const std::string &name, T value, typename std::enable_if<!std::is_class< T > {}, bool >::type=true)
Add a parameter by value.
void mergeReplaceParameters(const RenderParameters &params)
A component is an element that can be updated by a system. It is also linked to some other components...
Definition: Component.hpp:31
An entity is an scene element. It ties together components with a transform.
Definition: Entity.hpp:23
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Light(Entity *entity, const LightType &type, const std::string &name="light")
Definition: Light.cpp:9
virtual std::string getShaderInclude() const
Definition: Light.cpp:23
void initialize() override
Definition: Light.cpp:19
const Data::RenderParameters & getRenderParameters() const
Gives read-only access to the renderParameters of the light.
Definition: Light.hpp:95
Definition: Cage.cpp:3