pub struct ManifoldPoint {
pub anchor_a: Vec2,
pub anchor_b: Vec2,
pub separation: f32,
pub base_separation: f32,
pub normal_impulse: f32,
pub tangent_impulse: f32,
pub total_normal_impulse: f32,
pub normal_velocity: f32,
pub id: u16,
pub persisted: bool,
}Expand description
A manifold point is a contact point belonging to a contact manifold. It holds details related to the geometry and dynamics of the contact points. Box2D uses speculative collision so some contact points may be separated. (b2ManifoldPoint)
Fields§
§anchor_a: Vec2Location of the contact point relative to body A’s center of mass in world space.
anchor_b: Vec2Location of the contact point relative to body B’s center of mass in world space.
separation: f32The separation of the contact point, negative if penetrating
base_separation: f32Cached separation used for contact recycling
normal_impulse: f32The impulse along the manifold normal vector
tangent_impulse: f32The friction impulse
total_normal_impulse: f32The total normal impulse applied across sub-stepping and restitution
normal_velocity: f32Relative normal velocity pre-solve. Used for hit events.
id: u16Uniquely identifies a contact point between two shapes
persisted: boolDid this contact point exist the previous step?
Trait Implementations§
Source§impl Clone for ManifoldPoint
impl Clone for ManifoldPoint
Source§fn clone(&self) -> ManifoldPoint
fn clone(&self) -> ManifoldPoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more