Module org.dyn4j

Interface ContactConstraintSolver<T extends PhysicsBody>

  • Type Parameters:
    T - the PhysicsBody type
    All Known Implementing Classes:
    SequentialImpulses

    public interface ContactConstraintSolver<T extends PhysicsBody>
    Represents an impulse/velocity based rigid PhysicsBody collision resolver.
    Since:
    3.2.0
    Version:
    4.0.0
    Author:
    William Bittle
    • Method Detail

      • initialize

        void initialize​(List<ContactConstraint<T>> contactConstraints,
                        TimeStep step,
                        Settings settings)
        Performs initialization of the contact constraints.
        Parameters:
        contactConstraints - the contact constraints to solve
        step - the time step information
        settings - the current settings
      • solveVelocityContraints

        void solveVelocityContraints​(List<ContactConstraint<T>> contactConstraints,
                                     TimeStep step,
                                     Settings settings)
        Solves the ContactConstraints on the velocity level.
        Parameters:
        contactConstraints - the contact constraints to solve
        step - the time step information
        settings - the current settings
      • solvePositionContraints

        boolean solvePositionContraints​(List<ContactConstraint<T>> contactConstraints,
                                        TimeStep step,
                                        Settings settings)
        Solves the ContactConstraints on the position level.
        Parameters:
        contactConstraints - the contact constraints to solve
        step - the time step information
        settings - the current settings
        Returns:
        boolean true if the constraints have been solved