BEPUphysics.NarrowPhaseSystems.Pairs.BoxSpherePairHandler.Initialize C# (CSharp) Метод

Initialize() публичный Метод

Initializes the pair handler.
public Initialize ( BroadPhaseEntry entryA, BroadPhaseEntry entryB ) : void
entryA BroadPhaseEntry First entry in the pair.
entryB BroadPhaseEntry Second entry in the pair.
Результат void
        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);


        }