spacetime_physics/collisions/manifold.rs
1use crate::math::Vec3;
2
3#[derive(Clone, Debug, PartialEq)]
4pub struct CollisionPoint {
5 /// Position of the contact on the first object in world space.
6 pub world_a: Vec3,
7 /// Position of the contact on the second object in world space;
8 pub world_b: Vec3,
9 /// Position of the contact on the first object in local space.
10 pub local_a: Vec3,
11 /// Position of the contact on the second object in local space.
12 pub local_b: Vec3,
13 /// Contact normal, pointing towards the exterior of the first shape.
14 pub normal: Vec3,
15 /// Contact normal, pointing towards the exterior of the second shape.
16
17 /// Distance between the two contact points.
18 ///
19 /// If this is negative, this contact represents a penetration.
20 pub distance: f32,
21}