ContactMaterial constructor

ContactMaterial(
  1. Material m1,
  2. Material m2, {
  3. double friction = 0.3,
  4. double restitution = 0.3,
  5. double contactEquationStiffness = 1e7,
  6. double contactEquationRelaxation = 3,
  7. double frictionEquationStiffness = 1e7,
  8. double frictionEquationRelaxation = 3,
})

Implementation

ContactMaterial(
  Material m1,
  Material m2,
  {
    /**
     * Friction coefficient.
     * @default 0.3
     */
    this.friction = 0.3,
    /**
     * Restitution coefficient.
     * @default 0.3
     */
    this.restitution = 0.3,
    /**
     * Stiffness of the produced contact equations.
     * @default 1e7
     */
    this.contactEquationStiffness = 1e7,
    /**
     * Relaxation time of the produced contact equations.
     * @default 3
     */
    this.contactEquationRelaxation = 3,
    /**
     * Stiffness of the produced friction equations.
     * @default 1e7
     */
    this.frictionEquationStiffness = 1e7,
    /**
     * Relaxation time of the produced friction equations
     * @default 3
     */
    this.frictionEquationRelaxation = 3
  }
) {
  id = ContactMaterial.idCounter++;
  materials = [m1, m2];
}