C4 Engine Terathon Software C4 Engine API Documentation

• Physics Manager

API Links
Developer Links

RigidBodyController::HandleNewGeometryContact

Defined in:  C4Physics.h
Called when a new contact is made with a geometry node.
Prototype

virtual RigidBodyStatus HandleNewGeometryContact(const GeometryContact *contact);

Parameters
contact The new contact.
Description
The HandleNewGeometryContact function is called by the Physics Manager when a rigid body makes a new contact with a geometry node. This function can be overridden in a subclass of RigidBodyController in order to carry out a specialized response to a collision.

The contact parameter specifies the newly created GeometryContact object, which is an edge in the contact graph maintained by the Physics Manager. The rigid body for which the HandleNewGeometryContact function is called is always the start node of this edge, and a special null body is the finish node.

The HandleNewGeometryContact function should return one of the following values.
kRigidBodyUnchanged No change was made to the rigid body.
kRigidBodyDestroyed The rigid body was destroyed.
kRigidBodyDetached All contacts with the rigid body were broken.
The default implementation of the HandleNewGeometryContact function calls the World::HandleNewGeometryContact function.
See Also

RigidBodyController::HandleNewRigidBodyContact

World::HandleNewGeometryContact

GeometryContact