Toast Engine
Loading...
Searching...
No Matches
debris.hpp File Reference

Small voxel debris clusters. More...

#include "fracture_random.hpp"
#include <algorithm>
#include <array>
#include <bit>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/mat4x4.hpp>
#include <span>
#include <toast/export.hpp>
#include <vector>
Include dependency graph for debris.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  physics::DebrisVoxel
struct  physics::DebrisCluster
struct  physics::DebrisSpawn
struct  physics::DebrisBlast

Functions

constexpr auto physics::debrisBit (const glm::ivec3 &local) -> uint32_t
auto physics::clusterDebris (std::span< const DebrisVoxel > voxels, const glm::ivec3 &jitter, Rng &rng, float split_chance) -> std::vector< DebrisCluster >
auto physics::debrisSpeed (float energy, float mass, float scale) -> float
auto physics::debrisConeDirection (const glm::vec3 &axis, Rng &rng, float spread) -> glm::vec3
TOAST_API void physics::stepDebris (size_t steps)
TOAST_API void physics::clearDebris ()

Variables

constexpr float physics::k_max_debris_speed = 40.0f
constexpr float physics::k_debris_cone_spread = 0.5f
constexpr float physics::k_debris_max_spin = 8.0f

Detailed Description

Small voxel debris clusters.

Author
Xein
Date
17 Oct 2026