public override void Initialize(BroadPhaseEntry entryA, BroadPhaseEntry entryB)
{
box = entryA as ConvexCollidable<BoxShape>;
sphere = entryB as ConvexCollidable<SphereShape>;
if (box == null || sphere == null)
{
box = entryB as ConvexCollidable<BoxShape>;
sphere = entryA as ConvexCollidable<SphereShape>;
if (box == null || sphere == null)
{
throw new Exception("Inappropriate types used to initialize pair.");
}
}
//Reorder the entries so that the guarantee that the normal points from A to B is satisfied.
broadPhaseOverlap.entryA = box;
broadPhaseOverlap.entryB = sphere;
base.Initialize(entryA, entryB);
}