Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
point_light.hpp
Go to the documentation of this file.
1
8
9
#pragma once
10
#include "
light.hpp
"
11
12
#include <
toast/export.hpp
>
13
14
namespace
toast {
15
class
[[ToastNode, Icon(
"PointLight"
)]] TOAST_API PointLight :
public
Light {
16
public
:
17
PointLight() {
setLightType
(LightType::point); }
18
19
~PointLight()
override
=
default
;
20
21
[[nodiscard]]
22
auto
attenuation()
const
->
float
{
23
return
m_attenuation;
24
}
25
26
private
:
27
[[
Reflect
, Unit(
"m"
), Range(0, 1000)]]
28
float
m_attenuation = 10.0f;
29
};
30
}
toast::Light::setLightType
void setLightType(LightType type)
Tags the concrete light kind; called once from each subclass's own constructor body.
Definition
light.hpp:70
toast::Reflect
Definition
reflect.hpp:244
export.hpp
light.hpp
Base light node; registers with the renderer so it can be collected into the per-frame light list.
engine
src
toast
world
point_light.hpp
Generated by
1.17.0