Toast Engine
Loading...
Searching...
No Matches
fragment_extraction.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
10
11#include <array>
12#include <glm/glm.hpp>
13#include <optional>
17
18namespace physics {
19
20using DensityTable = std::array<uint32_t, voxel::k_palette_size>;
21
25 uint32_t voxels = 0;
26};
27
29 voxel::Volume volume;
30 glm::ivec3 offset;
31
34 uint32_t voxels = 0;
35};
36
38[[nodiscard]]
39auto extractFragmentVolume(voxel::Volume& source, const DetachedComponent& component, const DensityTable& density)
40 -> std::optional<ExtractedFragment>;
41
42void restoreFragment(voxel::Volume& source, voxel::Volume& fragment, glm::ivec3 offset);
43
44auto discardComponent(voxel::Volume& source, const DetachedComponent& component, const DensityTable& density) -> RemovedVoxels;
45
46}
Definition voxel_volume.hpp:21
TODO: Brief description of the file's purpose.
Definition component_classification.hpp:26
Definition fragment_extraction.hpp:28
voxel::MassMoments moments
In fragment voxel coordinates.
Definition fragment_extraction.hpp:33
Definition fragment_extraction.hpp:22
voxel::MassMoments moments
In source voxel coordinates.
Definition fragment_extraction.hpp:24
Definition mass_accumulator.hpp:18