コード例 #1
0
        protected int FindConnectionWithVertex(Node vertex)
        {
            for (int i = 0; i < NumConnections(); i++)
            {
                if (connections[i] != null)
                {
                    GridFace face = (GridFace)connections[i];
                    if (face != null && face.HasVertex(vertex))
                    {
                        return(i);
                    }
                }
            }

            return(-1);
        }
コード例 #2
0
 public void AddFace(GridFace newFace)
 {
     faces.Add(newFace);
 }
コード例 #3
0
 public GridFace(GridFace toCopy)
 {
     this.position = toCopy.position;
     this.vertices = toCopy.vertices;
 }