#include <SoftBodyContactListener.h>
A listener class that receives collision contact events for soft bodies against rigid bodies. It can be registered with the PhysicsSystem.
◆ ~SoftBodyContactListener()
virtual SoftBodyContactListener::~SoftBodyContactListener |
( |
| ) |
|
|
virtualdefault |
Ensure virtual destructor.
◆ OnSoftBodyContactAdded()
virtual void SoftBodyContactListener::OnSoftBodyContactAdded |
( |
const Body & |
inSoftBody, |
|
|
const SoftBodyManifold & |
inManifold |
|
) |
| |
|
inlinevirtual |
Called after all contact points for a soft body have been handled. You only receive one callback per body pair per simulation step and can use inManifold to iterate through all contacts. Note that this callback is called when all bodies are locked, so don't use any locking functions! You will receive a single callback for a soft body per simulation step for performance reasons, this callback will apply to all vertices in the soft body.
- Parameters
-
inSoftBody | The soft body that collided. It is safe to access this as the soft body is only updated on the current thread. |
inManifold | The manifold that describes the contact surface between the two bodies. Other bodies may be modified by other threads during this callback. |
◆ OnSoftBodyContactValidate()
Called whenever the soft body's aabox overlaps with another body's aabox (so receiving this callback doesn't tell if any of the vertices will collide). This callback can be used to change the behavior of the collision response for all vertices in the soft body or to completely reject the contact. Note that this callback is called when all bodies are locked, so don't use any locking functions!
- Parameters
-
inSoftBody | The soft body that collided. It is safe to access this as the soft body is only updated on the current thread. |
inOtherBody | The other body that collided. Note that accessing the position/orientation/velocity of inOtherBody may result in a race condition as other threads may be modifying the body at the same time. |
ioSettings | The settings for all contact points that are generated by this collision. |
- Returns
- Whether the contact should be processed or not.
The documentation for this class was generated from the following file: