Esempio n. 1
0
 public void Init()
 {
     count     = 0;
     minBucked = 0;
     hash      = manager.ObtainHalfedgeArray(hashSize);
     // Dummy Halfedge at the top of each hash
     for (int i = 0; i < hashSize; i++)
     {
         hash[i] = Halfedge.CreateDummy(manager);
         hash[i].nextInPriorityQueue = null;
     }
 }
Esempio n. 2
0
        public void Init(float xmin, float deltaX, int sqrtSitesNb)
        {
            this.xmin   = xmin;
            this.deltaX = deltaX;
            hashSize    = 2 * sqrtSitesNb;

            hash = manager.ObtainHalfedgeArray(hashSize);

            // Two dummy Halfedges:
            leftEnd  = Halfedge.CreateDummy(manager);
            rightEnd = Halfedge.CreateDummy(manager);
            leftEnd.edgeListLeftNeighbor   = null;
            leftEnd.edgeListRightNeighbor  = rightEnd;
            rightEnd.edgeListLeftNeighbor  = leftEnd;
            rightEnd.edgeListRightNeighbor = null;
            hash[0]            = leftEnd;
            hash[hashSize - 1] = rightEnd;
        }