Jitter.Collision.CollisionSystemPersistentSAP.DirtySortAxis C# (CSharp) Method

DirtySortAxis() private method

private DirtySortAxis ( List axis ) : void
axis List
return void
        private void DirtySortAxis(List<SweepPoint> axis)
        {
            axis.Sort(QuickSort);
            activeList.Clear();

            for (int i = 0; i < axis.Count; i++)
            {
                SweepPoint keyelement = axis[i];

                if (keyelement.Begin)
                {
                    foreach (IBroadphaseEntity body in activeList)
                    {
                        int count = t2bM.IncrementCounter(body.BroadphaseTag, keyelement.Body.BroadphaseTag);
                        if (count == 3) fullOverlaps.Add(new BodyPair(body, keyelement.Body));
                    }

                    activeList.Add(keyelement.Body);
                }
                else
                {
                    activeList.Remove(keyelement.Body);
                }
            }
        }
        #endregion