Toast Engine
Toggle main menu visibility
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
15
namespace
physics::material_defaults {
16
17
inline
constexpr
float
k_restitution = 0.1f;
18
inline
constexpr
float
k_static_friction = 0.6f;
19
inline
constexpr
float
k_dynamic_friction = 0.5f;
20
22
inline
constexpr
float
k_rolling_friction
= 0.01f;
23
inline
constexpr
float
k_spin_friction = 0.005f;
24
26
inline
constexpr
float
k_density
= 2000.0f;
27
inline
constexpr
float
k_toughness = 100.0f;
28
inline
constexpr
Hardness k_hardness = Hardness::medium;
29
inline
constexpr
FracturePattern k_fracture_pattern = FracturePattern::brittle;
30
32
inline
constexpr
float
k_structural_strength
= 1.0e6f;
33
34
inline
constexpr
float
k_debris_share = 0.2f;
35
inline
constexpr
float
k_fragment_share = 0.5f;
36
inline
constexpr
float
k_fragment_threshold = 0.3f;
37
inline
constexpr
uint32_t k_fragment_max_parts = 4;
38
inline
constexpr
float
k_shatter_threshold = 0.1f;
39
inline
constexpr
float
k_shatter_cell_size = 0.5f;
40
inline
constexpr
float
k_shatter_crack_cost = 1.0f;
41
inline
constexpr
float
k_shatter_release = 0.3f;
42
inline
constexpr
float
k_shatter_stretch = 3.0f;
43
inline
constexpr
float
k_shatter_crumble = 0.5f;
44
inline
constexpr
float
k_edge_noise = 0.25f;
45
inline
constexpr
float
k_edge_lobes = 0.35f;
46
inline
constexpr
float
k_edge_noise_scale = 4.0f;
47
48
}
hardness.hpp
Tiers of how hard a material is to break.
physics::material_defaults::k_structural_strength
constexpr float k_structural_strength
weak bricks
Definition
material_defaults.hpp:32
physics::material_defaults::k_density
constexpr float k_density
between wood at 600 and stone at 2600
Definition
material_defaults.hpp:26
physics::material_defaults::k_rolling_friction
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
engine
src
toast
physics
material_defaults.hpp
Generated by
1.17.0