public SquareNode GetNode(SquarePoint point) { SquareNode node = null; if (!nodes.TryGetValue(point, out node)) { return(null); } return(node); }
private MutableMeshVertex CreateVertex(SquarePoint point) { SquareNode node = GetNode(point); if (node == null) { throw new Exception("Cannot get node for point " + point); } if (node.Vertex != null) { return(node.Vertex); } var pos = GetAbsolutePosition(point); node.Vertex = mesh.CreateVertex(pos); return(node.Vertex); }