NewtonBodySetAngularDamping

From Newton Wiki
Jump to: navigation, search

NewtonBodySetAngularDamping

void  NewtonBodySetAngularDamping (const NewtonBody* body, const dFloat* angularDamp);

Usage

Apply the angular viscous damping coefficient to the body.

Parameters

  • const NewtonBody *bodyPtr - is the pointer to the body.
  • dFloat *angularDamp - pointer to an array of at least three floats containing the angular damping coefficients for the principal axis of the body.

Remarks

  • the default value of angularDamp 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 assumed by the integrator.
  • The dampening viscous friction torque is added to the external torque applied to the body every frame before going to the solver-integrator. This torque is proportional to the square of the magnitude of the angular velocity to the body in the opposite direction of the angular velocity of the body. An application can set angularDamp to zero when the to take 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 recomended that the linearDamp coefficient be set to a non-zero value for the majority of background bodies. This saves the application from needing to control these forces and also prevents the integrator from adding very large velocities to a body.

See also

NewtonBodyGetAngularDamping