Exemplo n.º 1
0
        public LineListNode Get(Line line)
        {
            LineListNode cur = zero;

            while (cur.value != line)
            {
                cur = cur.next;
            }
            return(cur);
        }
Exemplo n.º 2
0
        public List <LineListNode> GetAsList()
        {
            LineListNode        cur = zero.next;
            List <LineListNode> ret = new List <LineListNode>();

            do
            {
                ret.Add(cur);
                cur = cur.next;
            }while(cur.value != zero.value);
            return(ret);
        }
Exemplo n.º 3
0
 // Adds an edge into the list, making sure it is in the correct place in the list so it is always sorted.
 public void AddSorted(Line edge, float edgeAngle)
 {
     Length++;
     if (zero == null)
     {
         zero = new LineListNode(edge, edgeAngle);
     }
     else
     {
         LineListNode cur = zero.next;
         while (edgeAngle - cur.angle > .000001 && cur != zero)
         {
             cur = cur.next;
         }
         LineListNode newLLN = new LineListNode(edge, cur, cur.prev, edgeAngle);
         cur.prev.next = newLLN;
         cur.prev      = newLLN;
     }
 }
Exemplo n.º 4
0
 public LineListNode(Line v, LineListNode n, LineListNode p, float a)
 {
     value = v; next = n; prev = p; angle = a;
 }
Exemplo n.º 5
0
 public LineListNode(Line v, float a)
 {
     value = v; next = this; prev = this; angle = a;
 }
Exemplo n.º 6
0
 // Removes a  vertex
 public void RemoveSorted(LineListNode l)
 {
     l.prev.next = l.next;
     l.next.prev = l.prev;
     l           = null;
 }