SimdSolverContact

Type Alias SimdSolverContact 

Source
pub type SimdSolverContact = SolverContactGeneric<SimdReal, SIMD_WIDTH>;
Expand description

A group of SIMD_WIDTH solver contacts stored in SoA fashion for SIMD optimizations.

Aliased Type§

#[repr(C, align(16))]
pub struct SimdSolverContact { pub point: OPoint<f32, Const<2>>, pub dist: f32, pub friction: f32, pub restitution: f32, pub tangent_velocity: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, pub warmstart_impulse: f32, pub warmstart_tangent_impulse: Matrix<f32, Const<1>, Const<1>, ArrayStorage<f32, 1, 1>>, pub warmstart_twist_impulse: f32, pub is_new: f32, pub contact_id: [u32; 1], }

Fields§

§point: OPoint<f32, Const<2>>

The contact point in world-space.

§dist: f32

The distance between the two original contacts points along the contact normal. If negative, this is measures the penetration depth.

§friction: f32

The effective friction coefficient at this contact point.

§restitution: f32

The effective restitution coefficient at this contact point.

§tangent_velocity: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

The desired tangent relative velocity at the contact point.

This is set to zero by default. Set to a non-zero value to simulate, e.g., conveyor belts.

§warmstart_impulse: f32

Impulse used to warmstart the solve for the normal constraint.

§warmstart_tangent_impulse: Matrix<f32, Const<1>, Const<1>, ArrayStorage<f32, 1, 1>>

Impulse used to warmstart the solve for the friction constraints.

§warmstart_twist_impulse: f32

Impulse used to warmstart the solve for the twist friction constraints.

§is_new: f32

Whether this contact existed during the last timestep.

A value of 0.0 means false and 1.0 means true. This isn’t a bool for optimizations purpose with SIMD.

§contact_id: [u32; 1]

The index of the manifold contact used to generate this solver contact.

Implementations§

Source§

impl SimdSolverContact

Source

pub unsafe fn gather_unchecked( contacts: &[&[SolverContact]; 1], k: usize, ) -> Self