public override void Initialize(BroadPhaseEntry entryA, BroadPhaseEntry entryB)
{
triangle = entryA as ConvexCollidable<TriangleShape>;
convex = entryB as ConvexCollidable;
if (triangle == null || convex == null)
{
triangle = entryB as ConvexCollidable<TriangleShape>;
convex = entryA as ConvexCollidable;
if (triangle == null || convex == null)
throw new Exception("Inappropriate types used to initialize pair.");
}
//Contact normal goes from A to B.
broadPhaseOverlap.entryA = convex;
broadPhaseOverlap.entryB = triangle;
base.Initialize(entryA, entryB);
}