# Class ContactSolver

java.lang.Object
com.codename1.gaming.physics.box2d.dynamics.contacts.ContactSolver

public class ContactSolver extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `ContactSolver.ContactSolverDef`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final boolean`
  `DEBUG_SOLVER`
  `static final int`
  `INITIAL_NUM_CONSTRAINTS`
  For each solver, this is the initial number of constraints in the array, which expands as needed.
  `static final float`
  `k_errorTol`
  `static final float`
  `k_maxConditionNumber`
  Ensure a reasonable condition number.
  `Contact[]`
  `m_contacts`
  `int`
  `m_count`
  `ContactPositionConstraint[]`
  `m_positionConstraints`
  `Position[]`
  `m_positions`
  `TimeStep`
  `m_step`
  `Velocity[]`
  `m_velocities`
  `ContactVelocityConstraint[]`
  `m_velocityConstraints`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContactSolver()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `init(ContactSolver.ContactSolverDef def)`
  `final void`
  `initializeVelocityConstraints()`
  `final boolean`
  `solvePositionConstraints()`
  Sequential solver.
  `boolean`
  `solveTOIPositionConstraints(int toiIndexA, int toiIndexB)`
  `final void`
  `solveVelocityConstraints()`
  `void`
  `storeImpulses()`
  `void`
  `warmStart()`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DEBUG_SOLVER

    public static final boolean DEBUG_SOLVER
    See Also:
      - Constant Field Values

  - ### k_errorTol

    public static final float k_errorTol
    See Also:
      - Constant Field Values

  - ### INITIAL_NUM_CONSTRAINTS

    public static final int INITIAL_NUM_CONSTRAINTS
    For each solver, this is the initial number of constraints in the array, which expands as needed.
    See Also:
      - Constant Field Values

  - ### k_maxConditionNumber

    public static final float k_maxConditionNumber
    Ensure a reasonable condition number. for the block solver
    See Also:
      - Constant Field Values

  - ### m_step

    public TimeStep m_step

  - ### m_positions

    public Position[] m_positions

  - ### m_velocities

    public Velocity[] m_velocities

  - ### m_positionConstraints

    public ContactPositionConstraint[] m_positionConstraints

  - ### m_velocityConstraints

    public ContactVelocityConstraint[] m_velocityConstraints

  - ### m_contacts

    public Contact[] m_contacts

  - ### m_count

    public int m_count

- ## Constructor Details

  - ### ContactSolver

    public ContactSolver()

- ## Method Details

  - ### init

    public final void init(ContactSolver.ContactSolverDef def)

  - ### warmStart

    public void warmStart()

  - ### initializeVelocityConstraints

    public final void initializeVelocityConstraints()

  - ### solveVelocityConstraints

    public final void solveVelocityConstraints()

  - ### storeImpulses

    public void storeImpulses()

  - ### solvePositionConstraints

    public final boolean solvePositionConstraints()
    Sequential solver.

  - ### solveTOIPositionConstraints

    public boolean solveTOIPositionConstraints(int toiIndexA, int toiIndexB)