Enum nphysics2d::resolution::CorrectionMode
[−]
[src]
pub enum CorrectionMode<N: Real> { Velocity(N), VelocityAndPosition(N, N, N), VelocityAndPositionThresold(N, N, N), }
The correction coefficient used by the constraint solver.
Variants
Velocity(N)
Penetration are solved by the penalty method.
VelocityAndPosition(N, N, N)
Penetration are solved by the penalty method together with a hard repositioning.
VelocityAndPositionThresold(N, N, N)
Penetration are solved by the penalty method together with a hard repositioning.
The amount of velocity correction is bounded by threshold.
Methods
impl<N: Real> CorrectionMode<N>
[src]
fn vel_corr_factor(&self) -> N
[src]
The velocity correction coefficient.
fn pos_corr_factor(&self) -> N
[src]
The position correction coefficient.
fn min_depth_for_pos_corr(&self) -> N
[src]
The minimum penetration depth required to switch on the hard repositioning based method.
fn max_depth_for_vel_corr(&self) -> N
[src]
The max penetration depth the velocity correction will attempt to correct.