Interface IContactEventHandler
- Namespace
- Stride.BepuPhysics.Definitions.Contacts
- Assembly
- Stride.BepuPhysics.dll
Implements handlers for various collision events.
[Obsolete("IContactEventHandler as been superseded by IContactHandler, update your contact methods when migrating to this new class")]
public interface IContactEventHandler : IContactHandler
- Inherited Members
Properties
NoContactResponse
Whether the object this is attached to should let colliders pass through it
[Obsolete("IContactEventHandler as been superseded by IContactHandler, this property will never be called")]
bool NoContactResponse { get; }
Property Value
Methods
OnContactAdded<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, int, BepuSimulation)
Fires when a contact is added.
[Obsolete("IContactEventHandler as been superseded by IContactHandler, this method will never be called", true)]
void OnContactAdded<TManifold>(CollidableComponent eventSource, CollidableComponent other, ref TManifold contactManifold, bool flippedManifold, int contactIndex, int workerIndex, BepuSimulation bepuSimulation) where TManifold : unmanaged, IContactManifold<TManifold>
Parameters
eventSourceCollidableComponentCollidable that the event was attached to.
otherCollidableComponentOther collider
eventSourcecollided with.contactManifoldTManifoldSet of remaining contacts in the collision.
flippedManifoldboolWhether the manifold's normals and offset is flipped from the source's point of view.
contactIndexintIndex of the new contact in the contact manifold.
workerIndexintIndex of the worker thread that fired this event.
bepuSimulationBepuSimulationThe simulation where the contact occured.
Type Parameters
TManifoldType of the contact manifold detected.
Remarks
This may be called before OnStartedTouching<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, BepuSimulation), contacts are registered when two collidables are close enough, not necessarily when actually touching.
OnContactRemoved<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, int, BepuSimulation)
Fires when a contact is removed.
[Obsolete("IContactEventHandler as been superseded by IContactHandler, this method will never be called", true)]
void OnContactRemoved<TManifold>(CollidableComponent eventSource, CollidableComponent other, ref TManifold contactManifold, bool flippedManifold, int removedFeatureId, int workerIndex, BepuSimulation bepuSimulation) where TManifold : unmanaged, IContactManifold<TManifold>
Parameters
eventSourceCollidableComponentCollidable that the event was attached to.
otherCollidableComponentOther collider
eventSourcecollided with.contactManifoldTManifoldSet of remaining contacts in the collision.
flippedManifoldboolWhether the manifold's normals and offset is flipped from the source's point of view.
removedFeatureIdintFeature id of the contact that was removed and is no longer present in the contact manifold.
workerIndexintIndex of the worker thread that fired this event.
bepuSimulationBepuSimulationThe simulation where the contact occured.
Type Parameters
TManifoldType of the contact manifold detected.
Remarks
This may be called without a corresponding call to OnStoppedTouching<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, BepuSimulation), contacts are registered when two collidables are close enough, not necessarily when actually touching. If the two collidables grazed each other, none of the touching methods will be called.
OnPairCreated<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, BepuSimulation)
Fires when a pair is observed for the first time.
[Obsolete("IContactEventHandler as been superseded by IContactHandler, this method will never be called", true)]
void OnPairCreated<TManifold>(CollidableComponent eventSource, CollidableComponent other, ref TManifold contactManifold, bool flippedManifold, int workerIndex, BepuSimulation bepuSimulation) where TManifold : unmanaged, IContactManifold<TManifold>
Parameters
eventSourceCollidableComponentCollidable that the event was attached to.
otherCollidableComponentOther collider
eventSourcecollided with.contactManifoldTManifoldSet of remaining contacts in the collision.
flippedManifoldboolWhether the manifold's normals and offset is flipped from the source's point of view.
workerIndexintIndex of the worker thread that fired this event.
bepuSimulationBepuSimulationThe simulation where the contact occured.
Type Parameters
TManifoldType of the contact manifold detected.
OnPairEnded(CollidableComponent, CollidableComponent, BepuSimulation)
Fires when a pair ends.
[Obsolete("IContactEventHandler as been superseded by IContactHandler, this method will never be called", true)]
void OnPairEnded(CollidableComponent eventSource, CollidableComponent other, BepuSimulation bepuSimulation)
Parameters
eventSourceCollidableComponentCollidable that the event was attached to.
otherCollidableComponentOther collider
eventSourcecollided with.bepuSimulationBepuSimulationThe simulation where the contact occured.
OnPairUpdated<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, BepuSimulation)
Fires whenever a pair is updated. Will not fire for sleeping pairs.
[Obsolete("IContactEventHandler as been superseded by IContactHandler, this method will never be called", true)]
void OnPairUpdated<TManifold>(CollidableComponent eventSource, CollidableComponent other, ref TManifold contactManifold, bool flippedManifold, int workerIndex, BepuSimulation bepuSimulation) where TManifold : unmanaged, IContactManifold<TManifold>
Parameters
eventSourceCollidableComponentCollidable that the event was attached to.
otherCollidableComponentOther collider
eventSourcecollided with.contactManifoldTManifoldSet of remaining contacts in the collision.
flippedManifoldboolWhether the manifold's normals and offset is flipped from the source's point of view.
workerIndexintIndex of the worker thread that fired this event.
bepuSimulationBepuSimulationThe simulation where the contact occured.
Type Parameters
TManifoldType of the contact manifold detected.
OnStartedTouching<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, BepuSimulation)
Fires the first time a pair is observed to be touching. Touching means that there are contacts with nonnegative depths in the manifold.
[Obsolete("IContactEventHandler as been superseded by IContactHandler")]
void OnStartedTouching<TManifold>(CollidableComponent eventSource, CollidableComponent other, ref TManifold contactManifold, bool flippedManifold, int workerIndex, BepuSimulation bepuSimulation) where TManifold : unmanaged, IContactManifold<TManifold>
Parameters
eventSourceCollidableComponentCollidable that the event was attached to.
otherCollidableComponentOther collider
eventSourcecollided with.contactManifoldTManifoldSet of remaining contacts in the collision.
flippedManifoldboolWhether the manifold's normals and offset is flipped from the source's point of view.
workerIndexintIndex of the worker thread that fired this event.
bepuSimulationBepuSimulationThe simulation where the contact occured.
Type Parameters
TManifoldType of the contact manifold detected.
OnStoppedTouching<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, BepuSimulation)
Fires when a pair stops touching. Touching means that there are contacts with nonnegative depths in the manifold.
[Obsolete("IContactEventHandler as been superseded by IContactHandler")]
void OnStoppedTouching<TManifold>(CollidableComponent eventSource, CollidableComponent other, ref TManifold contactManifold, bool flippedManifold, int workerIndex, BepuSimulation bepuSimulation) where TManifold : unmanaged, IContactManifold<TManifold>
Parameters
eventSourceCollidableComponentCollidable that the event was attached to.
otherCollidableComponentOther collider
eventSourcecollided with.contactManifoldTManifoldSet of remaining contacts in the collision.
flippedManifoldboolWhether the manifold's normals and offset is flipped from the source's point of view.
workerIndexintIndex of the worker thread that fired this event.
bepuSimulationBepuSimulationThe simulation where the contact occured.
Type Parameters
TManifoldType of the contact manifold detected.
OnTouching<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, BepuSimulation)
Fires whenever a pair is observed to be touching. Touching means that there are contacts with nonnegative depths in the manifold. Will not fire for sleeping pairs.
[Obsolete("IContactEventHandler as been superseded by IContactHandler")]
void OnTouching<TManifold>(CollidableComponent eventSource, CollidableComponent other, ref TManifold contactManifold, bool flippedManifold, int workerIndex, BepuSimulation bepuSimulation) where TManifold : unmanaged, IContactManifold<TManifold>
Parameters
eventSourceCollidableComponentCollidable that the event was attached to.
otherCollidableComponentOther collider
eventSourcecollided with.contactManifoldTManifoldSet of remaining contacts in the collision.
flippedManifoldboolWhether the manifold's normals and offset is flipped from the source's point of view.
workerIndexintIndex of the worker thread that fired this event.
bepuSimulationBepuSimulationThe simulation where the contact occured.
Type Parameters
TManifoldType of the contact manifold detected.