public void AddNeighbor(STSegment segment)
        {
            if (NeighborSegments.Contains(segment))
            {
                return;
            }

            NeighborSegments.Add(segment);
        }
        private void UpdateSegments()
        {
            STSegment cacheSegment;

            m_segments.Clear();
            for (int i = 0; i < m_edges.Length; i++)
            {
                cacheSegment = new STSegment(m_edges[i].PointA, m_edges[i].PointB, GetPointIndex(m_edges[i].PointA), GetPointIndex(m_edges[i].PointB));
                m_segments.Add(cacheSegment);
            }

            AfterUpdateSegments();
        }
Exemple #3
0
        private void AddProcess(STSegment segment)
        {
            if (m_neighborSegments[segment.PointA].Count == 0 &&
                m_neighborSegments[segment.PointB].Count == 0)
            {
                return;
            }

            Vector3 lastPoint = m_processStack.Peek();

            if (segment.PointA != lastPoint && m_neighborSegments[segment.PointA].Count != 0)
            {
                m_processStack.Push(segment.PointA);
            }
            else if (segment.PointB != lastPoint && m_neighborSegments[segment.PointB].Count != 0)
            {
                m_processStack.Push(segment.PointB);
            }
        }
Exemple #4
0
 private void RemoveSegment(STSegment segment)
 {
     m_neighborSegments[segment.PointA].Remove(segment);
     m_neighborSegments[segment.PointB].Remove(segment);
 }