Unravel Engine C++ Reference
Loading...
Searching...
No Matches
volume_component.h
Go to the documentation of this file.
1#pragma once
2
3#include <base/basetypes.hpp>
5#include <math/math.h>
6
7namespace unravel
8{
9
10enum class volume_mode : uint8_t
11{
12 local,
13 global,
14};
15
22class volume_component : public component_crtp<volume_component>
23{
24public:
32 int priority = 0;
36 float weight = 1.0f;
41 float blend_distance = 1.0f;
45 math::vec3 extents = {1.0f, 1.0f, 1.0f};
50 auto get_local_bounds() const -> math::bbox;
51};
52
53} // namespace unravel
Spatial volume that applies post-processing effects when the camera is inside. Effect settings come f...
auto get_local_bounds() const -> math::bbox
Gets local bounding box (before transform).
int priority
Higher priority wins when multiple volumes overlap.
float blend_distance
Distance outside the volume over which blending ramps from 0 to 1 (local volumes only)....
volume_mode mode
Volume mode: local uses bounds, global affects camera everywhere.
math::vec3 extents
Half-extents for local box bounds, centered at entity origin.
float weight
Influence multiplier in range [0, 1].
Definition bbox.cpp:5
CRTP (Curiously Recurring Template Pattern) base structure for components.