NewtonBodySetLinearDamping

From Newton Wiki
Revision as of 08:02, 10 June 2019 by WikiSysop (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NewtonBodySetLinearDamping

void NewtonBodySetLinearDamping( const NewtonBody* bodyPtr, dFloat linearDamp)

Usage

Apply the linear viscous damping coefficient to the body.

Parameters

  • const NewtonBody *bodyPtr - is the pointer to the body.
  • dFloat linearDamp - linear damping coefficient.

Remarks

  • the default value of linearDamp is clamped to a value between 0.0 and 1.0; the default value is 0.1, There is a non zero implicit attenuation value of 0.0001 assume by the integrator.
  • The dampening viscous friction force is added to the external force applied to the body every frame before going to the solver-integrator. This force is proportional to the square of the magnitude of the velocity to the body in the opposite direction of the velocity of the body. An application can set linearDamp to zero when the application takes control of the external forces and torque applied to the body, should the application desire to have absolute control of the forces over that body. However, it is recommended that the linearDamp coefficient is set to a non-zero value for the majority of background bodies. This saves the application from having to control these forces and also prevents the integrator from adding very large velocities to a body.

See also

NewtonBodyGetLinearDamping