Exemplo n.º 1
0
        public SquareNode GetNode(SquarePoint point)
        {
            SquareNode node = null;

            if (!nodes.TryGetValue(point, out node))
            {
                return(null);
            }
            return(node);
        }
Exemplo n.º 2
0
        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);
        }