Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::volume_component Class Reference

Spatial volume that applies post-processing effects when the camera is inside. Effect settings come from sibling components (bloom_component, tonemapping_component, etc.) on the same entity. More...

#include <volume_component.h>

Inheritance diagram for unravel::volume_component:
unravel::component_crtp< volume_component > unravel::basic_component

Public Member Functions

auto get_local_bounds () const -> math::bbox
 Gets local bounding box (before transform).
 
- Public Member Functions inherited from unravel::basic_component
void touch ()
 Marks the component as 'touched'.
 

Public Attributes

volume_mode mode = volume_mode::local
 Volume mode: local uses bounds, global affects camera everywhere.
 
int priority = 0
 Higher priority wins when multiple volumes overlap.
 
float weight = 1.0f
 Influence multiplier in range [0, 1].
 
float blend_distance = 1.0f
 Distance outside the volume over which blending ramps from 0 to 1 (local volumes only). Contribution is 1 at the boundary and inside; ramps down to 0 over this distance when outside.
 
math::vec3 extents = {1.0f, 1.0f, 1.0f}
 Half-extents for local box bounds, centered at entity origin.
 
- Public Attributes inherited from unravel::basic_component
bool eto {}
 Disable empty type optimizations.
 

Additional Inherited Members

- Public Types inherited from unravel::component_crtp< volume_component >
using base
 
- Static Public Attributes inherited from unravel::component_crtp< volume_component >
static constexpr bool in_place_delete
 Indicates if the component can be deleted in place.
 

Detailed Description

Spatial volume that applies post-processing effects when the camera is inside. Effect settings come from sibling components (bloom_component, tonemapping_component, etc.) on the same entity.

Definition at line 22 of file volume_component.h.

Member Function Documentation

◆ get_local_bounds()

auto unravel::volume_component::get_local_bounds ( ) const -> math::bbox

Gets local bounding box (before transform).

Returns
Bounding box with min=-extents, max=extents.

Definition at line 6 of file volume_component.cpp.

Member Data Documentation

◆ blend_distance

float unravel::volume_component::blend_distance = 1.0f

Distance outside the volume over which blending ramps from 0 to 1 (local volumes only). Contribution is 1 at the boundary and inside; ramps down to 0 over this distance when outside.

Definition at line 41 of file volume_component.h.

◆ extents

math::vec3 unravel::volume_component::extents = {1.0f, 1.0f, 1.0f}

Half-extents for local box bounds, centered at entity origin.

Definition at line 45 of file volume_component.h.

◆ mode

volume_mode unravel::volume_component::mode = volume_mode::local

Volume mode: local uses bounds, global affects camera everywhere.

Definition at line 28 of file volume_component.h.

◆ priority

int unravel::volume_component::priority = 0

Higher priority wins when multiple volumes overlap.

Definition at line 32 of file volume_component.h.

◆ weight

float unravel::volume_component::weight = 1.0f

Influence multiplier in range [0, 1].

Definition at line 36 of file volume_component.h.


The documentation for this class was generated from the following files: