Esempio n. 1
0
 public FrameCoherentSAPDetector()
 {
     this.xExtentList    = new ExtentList(this);
     this.yExtentList    = new ExtentList(this);
     this.xInfoList      = new ExtentInfoList(this);
     this.yInfoList      = new ExtentInfoList(this);
     this.collisionPairs = new CollisionPairDictionary();
 }
 public SweepAndPruneCollider(PhysicsSimulator physicsSimulator)
 {
     _physicsSimulator = physicsSimulator;
     _xExtentList      = new ExtentList(this);
     _yExtentList      = new ExtentList(this);
     _xInfoList        = new ExtentInfoList(this);
     _yInfoList        = new ExtentInfoList(this);
     collisionPairs    = new CollisionPairDictionary();
 }
Esempio n. 3
0
        private int ExtentInfoListRemoveAllRemoved(ExtentInfoList l)
        {
            int removed = 0;

            for (int i = 0; i < l.Count; i++)
            {
                if (l[i].Geometry.isRemoved)
                {
                    removed++;
                    l.RemoveAt(i);
                    i--;
                }
            }
            return(removed);
        }