Interface IOverlapCallback
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
Receives the shapes found by an overlap query.
public interface IOverlapCallbackExamples
struct CountBodies : IOverlapCallback
{
public int Count;
public bool OnOverlap(Shape shape)
{
Count++;
return true; // keep going
}
}
var callback = new CountBodies();
world.OverlapBox(explosionCentre, new Vector3(5.0f), ref callback);
Remarks
Implement this on a struct, for the same reasons as Box3D.IRaycastCallback. The world is locked while the query runs, so do not create or destroy anything from inside it.
Methods
- OnOverlap(Shape)
-
Called once for each shape found.