Toast Engine
Loading...
Searching...
No Matches
material_defaults.hpp
Go to the documentation of this file.
1
7
8#pragma once
9
10#include "fracture_pattern.hpp"
11#include "hardness.hpp"
12
13#include <cstdint>
14
15namespace physics::material_defaults {
16
17inline constexpr float k_restitution = 0.1f;
18inline constexpr float k_static_friction = 0.6f;
19inline constexpr float k_dynamic_friction = 0.5f;
20
22inline constexpr float k_rolling_friction = 0.01f;
23inline constexpr float k_spin_friction = 0.005f;
24
26inline constexpr float k_density = 2000.0f;
27inline constexpr float k_toughness = 100.0f;
28inline constexpr Hardness k_hardness = Hardness::medium;
29inline constexpr FracturePattern k_fracture_pattern = FracturePattern::brittle;
30
32inline constexpr float k_structural_strength = 1.0e6f;
33
34inline constexpr float k_debris_share = 0.2f;
35inline constexpr float k_fragment_share = 0.5f;
36inline constexpr float k_fragment_threshold = 0.3f;
37inline constexpr uint32_t k_fragment_max_parts = 4;
38inline constexpr float k_shatter_threshold = 0.1f;
39inline constexpr float k_shatter_cell_size = 0.5f;
40inline constexpr float k_shatter_crack_cost = 1.0f;
41inline constexpr float k_shatter_release = 0.3f;
42inline constexpr float k_shatter_stretch = 3.0f;
43inline constexpr float k_shatter_crumble = 0.5f;
44inline constexpr float k_edge_noise = 0.25f;
45inline constexpr float k_edge_lobes = 0.35f;
46inline constexpr float k_edge_noise_scale = 4.0f;
47
48}
Tiers of how hard a material is to break.
constexpr float k_structural_strength
weak bricks
Definition material_defaults.hpp:32
constexpr float k_density
between wood at 600 and stone at 2600
Definition material_defaults.hpp:26
constexpr float k_rolling_friction
A ball rolling on a hard floor loses a few percent of its speed per metre.
Definition material_defaults.hpp:22