NewtonMaterialSetSurfaceThickness

From Newton Wiki
Jump to: navigation, search

NewtonMaterialSetSurfaceThickness

 void NewtonMaterialSetSurfaceThickness (const NewtonWorld* newtonWorld, int id0, int id1, dFloat thickness);

Usage

Set an imaginary thickness between the collision geometry of two colliding bodies


Parameters

  • const NewtonWorld* const newtonWorld
  • int id0
  • int id1
  • dFloat thickness

Return

  • (Procedure)

Description

  • Set an imaginary thickness between the collision geometry of two colliding bodies whose physics properties are defined by this material pair when two bodies collide the engine resolve contact inter penetration by applying a small restoring velocity at each contact point. By default this restoring velocity will stop when the two contacts are at zero inter penetration distance. However by setting a non zero thickness the restoring velocity will continue separating the contacts until the distance between the two point of the collision geometry is equal to the surface thickness.
  • Surfaces thickness can improve the behaviors of rolling objects on flat surfaces.
  • Surface thickness does not alter the performance of contact calculation.

Remarks

Added since Newton 2.0

See also