3 #include <Core/Utils/Color.hpp>
4 #include <Engine/RaEngine.hpp>
5 #include <Engine/Scene/Component.hpp>
7 #include <Engine/Data/RenderParameters.hpp>
27 enum LightType :
int { DIRECTIONAL = 0, POINT, SPOT, POLYGONAL };
35 Scalar constant { 1 };
37 Scalar quadratic { 0 };
42 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
51 ~
Light()
override =
default;
75 virtual void setPosition(
const Eigen::Matrix<Scalar, 3, 1>& ) {}
108 virtual std::string getShaderInclude()
const;
113 void initialize()
override;
118 LightType m_type { LightType::DIRECTIONAL };
void addParameter(const std::string &name, T value, typename std::enable_if<!std::is_class< T > {}, bool >::type=true)
Add a parameter by value.
A component is an element that can be updated by a system. It is also linked to some other components...
An entity is an scene element. It ties together components with a transform.
Data::RenderParameters & getRenderParameters()
Gives read-write access to the renderParameters of the light.
void setColor(const Core::Utils::Color &color)
const Core::Utils::Color & getColor() const
const Data::RenderParameters & getRenderParameters() const
Gives read-only access to the renderParameters of the light.
const LightType & getType() const
virtual void setDirection(const Eigen::Matrix< Scalar, 3, 1 > &)
virtual void setPosition(const Eigen::Matrix< Scalar, 3, 1 > &)