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

Deterministic randomness for destruction. More...

#include "body.hpp"
#include "shape.hpp"
#include <glm/glm.hpp>
#include <numbers>
#include <toast/hash.hpp>
#include <toast/voxel/voxel_constants.hpp>
Include dependency graph for fracture_random.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  physics::Rng

Macros

#define LARP(a, b, c)

Enumerations

enum class  FractureStream : uint8_t {
  edge_noise = 1 , shatter_points = 2 , granular = 3 , debris = 4 ,
  edge_lobes = 6 , core_split = 7
}

Functions

constexpr auto physics::streamSeed (uint64_t seed, FractureStream stream) noexcept -> uint64_t
constexpr auto physics::unitFloat (uint64_t bits) noexcept -> float
auto physics::sphereDirection (float u, float v) noexcept -> glm::vec3
constexpr auto physics::hashCell (uint64_t seed, glm::ivec3 cell) noexcept -> uint64_t
auto physics::fractureSeed (BodyID source, ShapeID shape, glm::vec3 local_point, uint64_t tick) noexcept -> uint64_t
constexpr auto physics::hash01 (uint64_t seed, glm::ivec3 cell) noexcept -> float
auto physics::hashUnit3 (uint64_t seed, uint64_t index) noexcept -> glm::vec3
auto physics::valueNoise3 (uint64_t seed, glm::vec3 p) noexcept -> float

Detailed Description

Deterministic randomness for destruction.

Author
Xein
Date
16 Oct 2026

Macro Definition Documentation

◆ LARP

#define LARP ( a,
b,
c )
Value:
std::lerp(a, b, c)