Example #1
0
        public bool MoveNext()
        {
            _currentIndex++;

            if (_edgeIndex >= _hull.EdgeCount - 1)
            {
                return(false);
            }
            else if (_offset == -1)
            {
                _edgeIndex = _currentIndex;
            }
            else if (_currentIndex == 0)
            {
                _edgeIndex = _offset;
            }
            else
            {
                ref var edge = ref _hull.GetEdgeRef(_edgeIndex);
                if (edge.Next == _offset)
                {
                    return(false);
                }
                _edgeIndex = edge.Next;
            }
Example #2
0
 public static void DrawEdge(int i, RigidTransform t1, NativeHull hull1, Color?color = null)
 {
     if (i > 0 && i < hull1.EdgeCount - 1)
     {
         ref var localEdge = ref hull1.GetEdgeRef(i);
         ref var twinEdge  = ref hull1.GetEdgeRef(localEdge.Twin);