Toast Engine
Loading...
Searching...
No Matches
voxel_shape_data.hpp
Go to the documentation of this file.
1
7
8#pragma once
9
10#include "anchor_mask.hpp"
12#include "damage_command.hpp"
13#include "shape.hpp"
14
15#include <cstdint>
16#include <memory>
17#include <optional>
23
24namespace physics {
25
27 voxel::Volume* volume = nullptr;
29 voxel::MassMoments moments;
30 voxel::Palette palette;
31 voxel::MaterialLibrary materials;
33 uint64_t palette_uid = 0;
34 uint32_t source_revision = 0;
35 uint32_t surface_revision = 1;
36 uint32_t solid_voxel_count = 0;
37 AnchorMask anchor_mask = k_anchor_null;
38 bool connectivity_dirty = false;
39 std::optional<FragmentPush> pending_push;
40 std::vector<DetachedComponent> detached_components;
41 std::unique_ptr<voxel::Volume> owned_volume;
42 BodyID fragment_origin;
43 uint64_t fragment_sequence = 0;
44 float fragment_sleep_seconds = 0.0f;
45};
46
47struct VoxelShapeSlot {
48 VoxelShapeSlot() = default;
49 VoxelShapeSlot(const VoxelShapeSlot&) = delete;
50 auto operator=(const VoxelShapeSlot&) -> VoxelShapeSlot& = delete;
51 VoxelShapeSlot(VoxelShapeSlot&&) noexcept = default;
52 auto operator=(VoxelShapeSlot&&) noexcept -> VoxelShapeSlot& = default;
53
54 std::optional<VoxelShapeData> data;
55 uint32_t generation = 1;
56};
57
58}
TODO: Brief description of the file's purpose.
Keyed by brick slot not pool id since uniform bricks have no pool id and shared bricks differ per ins...
Definition surface.hpp:174
Definition voxel_volume.hpp:21
TODO: Brief description of the file's purpose.
The kinds of damage that break voxels.
Shape identifiers, geometry, and runtime records.
Definition body.hpp:20
Definition voxel_shape_data.hpp:26
uint64_t palette_uid
Source palette uid so a hot reload can refresh the copies above.
Definition voxel_shape_data.hpp:33
Definition mass_accumulator.hpp:18
Definition palette.hpp:143
Entry 0 is the empty voxel and must stay all zero.
Definition palette.hpp:59