Module org.dyn4j

Interface CoefficientMixer


  • @Deprecated
    public interface CoefficientMixer
    Deprecated.
    Deprecated in 4.0.0. Use the CoefficientMixer in the world package instead.
    Interface used to customize the way friction and restitution coefficients are mixed.

    The DEFAULT_MIXER performs the following operations for friction and restitution mixing respectively:

     sqrt(friction1 * friction2)
     max(restitution1, restitution2)
    Since:
    1.0.0
    Version:
    4.0.0
    Author:
    William Bittle
    • Field Detail

      • DEFAULT_MIXER

        static final CoefficientMixer DEFAULT_MIXER
        Deprecated.
        The default dynamics mixer
    • Method Detail

      • mixFriction

        double mixFriction​(double friction1,
                           double friction2)
        Deprecated.
        Method used to mix the coefficients of friction of two BodyFixtures.
        Parameters:
        friction1 - the coefficient of friction for the first BodyFixture
        friction2 - the coefficient of friction for the second BodyFixture
        Returns:
        double
      • mixRestitution

        double mixRestitution​(double restitution1,
                              double restitution2)
        Deprecated.
        Method used to mix the coefficients of restitution of two BodyFixtures.
        Parameters:
        restitution1 - the coefficient of restitution for the first BodyFixture
        restitution2 - the coefficient of restitution for the second BodyFixture
        Returns:
        double