NewtonBodySetContinuousCollisionMode

From Newton Wiki
Jump to: navigation, search

NewtonBodySetContinuousCollisionMode

void NewtonBodySetContinuousCollisionMode( const NewtonBody* bodyPtr, unsigned state)

Usage

Set the continuous collision state mode for this rigid body.

Parameters

  • const NewtonBody *bodyPtr - pointer to the body.
  • int state - collision state. 1 indicates this body may not tunnel through other objects while moving at high speed. 0 ignore high speed collision checks.

Return

  • Nothing.

Remarks

  • continue collision mode enable allow the engine to predict colliding contact on rigid bodies Moving at high speed of subject to strong forces.
  • continue collision mode does not prevent rigid bodies from interpenetration instead it prevent bodies from passing trough each others by extrapolating contact points when the bodies normal contact calculation determine the bodies are not colliding.
  • for performance reason the bodies angular velocities is only use on the broad face of the collision, but not on the contact calculation.
  • continue collision does not perform back tracking to determine time of contact, instead it extrapolate contact by incrementally extruding the collision geometries of the two colliding bodies along the linear velocity of the bodies during the time step, if during the extrusion colliding contact are found, a collision is declared and the normal contact resolution is called.
  • for continue collision to be active the continue collision mode must on the material pair of the colliding bodies as well as on at least one of the two colliding bodies.
  • Because there is penalty of about 40% to 80% depending of the shape complexity of the collision geometry, this feature is set off by default. It is the job of the application to determine what bodies need this feature on. Good guidelines are: very small objects, and bodies that move at very high speed.

See also

NewtonBodyGetContinuousCollisionMode NewtonBodySetContinuousCollisionMode