27 friend class ::lug::Graphics::Builder::Light;
39 Math::Vec3f position{0.0f, 0.0f, 0.0f};
41 Math::Vec4f color{0.0f, 0.0f, 0.0f, 0.0f};
42 Math::Vec3f direction{0.0f, 0.0f, 0.0f};
43 float constantAttenuation{0.0f};
44 float linearAttenuation{0.0f};
45 float quadraticAttenuation{0.0f};
46 float falloffAngle{0.0f};
47 float falloffExponent{0.0f};
51 static constexpr uint32_t strideShader{ 80 };
62 void setType(
Type type);
63 void setColor(
const Math::Vec4f& color);
64 void setDirection(
const Math::Vec3f& direction);
65 void setConstantAttenuation(
float constantAttenuation);
66 void setDistance(
float distance);
67 void setLinearAttenuation(
float linearAttenuation);
68 void setQuadraticAttenuation(
float quadraticAttenuation);
69 void setFalloffAngle(
float falloffAngle);
70 void setFalloffExponent(
float falloffExponent);
79 const Math::Vec4f& getColor()
const;
80 const Math::Vec3f& getDirection()
const;
81 float getConstantAttenuation()
const;
82 float getDistance()
const;
83 float getLinearAttenuation()
const;
84 float getQuadraticAttenuation()
const;
85 float getFalloffAngle()
const;
86 float getFalloffExponent()
const;
97 Light(
const std::string& name,
Type type);
102 Math::Vec4f _color{0.0f, 0.0f, 0.0f, 1.0f};
103 Math::Vec3f _direction{0.0f, 0.0f, 0.0f};
104 float _constantAttenuation{0.0f};
105 float _distance{0.0f};
106 float _linearAttenuation{1.0f};
107 float _quadraticAttenuation{1.0f};
108 float _falloffAngle{Math::halfPi<float>()};
109 float _falloffExponent{0.0f};
Scene & operator=(const Scene &)=delete