loam_physics/response.rs
1use crate::integrator::PhysicsSpace;
2
3pub const FRICTION_COEFF: f32 = 0.35;
4
5pub struct Contact<S: PhysicsSpace> {
6 /// Unit, from body A toward body B, in A's tangent space.
7 pub normal: S::Vector,
8
9 pub point: S::Point,
10
11 /// Positive when the bodies overlap.
12 pub penetration: f32,
13
14 pub restitution: f32,
15}
16
17impl<S: PhysicsSpace> Clone for Contact<S> {
18 fn clone(&self) -> Self {
19 *self
20 }
21}
22
23impl<S: PhysicsSpace> Copy for Contact<S> {}