NewtonMaterialGetContactForce

From Newton Wiki
Jump to: navigation, search

NewtonMaterialGetContactForce

void NewtonMaterialGetContactForce( const NewtonMaterial* materialHandle, dFloat* forcePtr)

Usage

Get the contact force vector in global space.

Parameters

  • const NewtonMaterial materialHandle - pointer to a material pair.
  • dFloat *forcePtr, - pointer to an array of at least three floats to hold the force vector in global space.

Return

  • Nothing.

Remarks

  • The contact force value is only valid when calculating resting contacts. This means if two bodies collide with non zero relative velocity, the reaction force will be an impulse, which is not a reaction force, this will return zero vector. this function will only return meaningful values when the colliding bodies are at rest.
  • This function can only be called from a material callback event handler.

See also

NewtonMaterialSetCollisionCallback