Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
reflection_probe.hpp
Go to the documentation of this file.
1
8
9
#pragma once
10
#include "
node_3d.hpp
"
11
12
#include <algorithm>
13
#include <
toast/export.hpp
>
14
15
namespace
toast {
16
33
class
[[ToastNode, Icon(
"Eclipse"
)]] TOAST_API ReflectionProbe :
public
Node3D
{
34
public
:
35
ReflectionProbe() =
default
;
36
~ReflectionProbe()
override
=
default
;
37
39
[[nodiscard]]
40
auto
influenceRadius
() const noexcept ->
float
{
41
return
m_influence_radius;
42
}
43
45
[[nodiscard]]
46
auto
boxExtents
() const noexcept -> const glm::vec3& {
47
return
m_box_extents;
48
}
49
50
[[nodiscard]]
51
auto
intensity() const noexcept ->
float
{
52
return
m_intensity;
53
}
54
55
[[nodiscard]]
56
auto
usesBoxProjection() const noexcept ->
bool
{
57
return
m_box_projection;
58
}
59
61
[[nodiscard]]
62
auto
resolution
() const noexcept -> uint32_t {
63
return
static_cast<
uint32_t
>
(std::clamp(m_resolution, 32, 512));
64
}
65
67
[[nodiscard]]
68
auto
isPrebaked
() const noexcept ->
bool
{
69
return
m_prebaked;
70
}
71
72
private
:
73
void
init();
74
void
end();
75
void
destroy();
76
83
[[
Reflect
, Name(
"Influence Radius"
), Unit(
"m"
), Range(0.1, 500.0)]]
84
float
m_influence_radius = 10.0f;
85
92
[[
Reflect
, Name(
"Box Extents"
), Unit(
"m"
), Group(
"Projection"
)]]
alignas
(16) glm::vec3 m_box_extents = glm::vec3(5.0f);
93
96
[[
Reflect
, Name(
"Box Projection"
), Group(
"Projection"
)]]
97
bool
m_box_projection =
true
;
98
99
[[
Reflect
, Name(
"Intensity"
), Range(0.0, 8.0)]]
100
float
m_intensity = 1.0f;
101
106
[[
Reflect
, Name(
"Resolution"
), Range(32.0, 512.0), Group(
"Capture"
)]]
107
int
m_resolution = 128;
108
112
[[
Reflect
, Name(
"Prebaked"
), Group(
"Capture"
)]]
113
bool
m_prebaked =
false
;
114
115
bool
m_registered_proxy =
false
;
116
};
117
118
}
toast::Node3D
Definition
node_3d.hpp:25
toast::Reflect
Definition
reflect.hpp:244
toast::ReflectionProbe::boxExtents
auto boxExtents() const noexcept -> const glm::vec3 &
Definition
reflection_probe.hpp:46
toast::ReflectionProbe::resolution
auto resolution() const noexcept -> uint32_t
Definition
reflection_probe.hpp:62
toast::ReflectionProbe::isPrebaked
auto isPrebaked() const noexcept -> bool
Definition
reflection_probe.hpp:68
toast::ReflectionProbe::influenceRadius
auto influenceRadius() const noexcept -> float
Definition
reflection_probe.hpp:40
export.hpp
node_3d.hpp
Node with 3D spatial transforms.
engine
src
toast
world
reflection_probe.hpp
Generated by
1.17.0