示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="path"></param>
        /// <param name="graph"></param>
        /// <param name="setVertexAttributes"></param>
        /// <param name="setHedgeAttributes"></param>
        public static void ReadFromJson <V, E, VA, EA>(string path, HeGraph <V, E> graph, Action <V, VA> setVertexAttributes = null, Action <E, EA> setHedgeAttributes = null)
            where V : HeGraph <V, E> .Vertex
            where E : HeGraph <V, E> .Halfedge
        {
            var buffer = CoreIO.DeserializeJson <HeGraphJsonBuffer <VA, EA> >(path);

            buffer.ReadTo(graph, setVertexAttributes, setHedgeAttributes);
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="path"></param>
        /// <param name="graph"></param>
        /// <param name="setVertexAttributes"></param>
        /// <param name="setHedgeAttributes"></param>
        public static void ReadFromJson <TV, TE>(string path, HeGraphBase <TV, TE> graph, Action <TV, object[]> setVertexAttributes = null, Action <TE, object[]> setHedgeAttributes = null)
            where TV : HeGraphBase <TV, TE> .Vertex
            where TE : HeGraphBase <TV, TE> .Halfedge
        {
            var buffer = CoreIO.DeserializeJson <HeJsonBuffer>(path);

            buffer.ReadTo(graph, setVertexAttributes, setHedgeAttributes);
        }
示例#3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="path"></param>
        /// <param name="graph"></param>
        /// <param name="setVertexAttributes"></param>
        /// <param name="setHedgeAttributes"></param>
        public static void ReadFromJson <V, E, F, VA, EA, FA>(string path, HeMesh <V, E, F> mesh, Action <V, VA> setVertexAttributes = null, Action <E, EA> setHedgeAttributes = null, Action <F, FA> setFaceAttributes = null)
            where V : HeMesh <V, E, F> .Vertex
            where E : HeMesh <V, E, F> .Halfedge
            where F : HeMesh <V, E, F> .Face
        {
            var buffer = CoreIO.DeserializeJson <HeMeshJsonBuffer <VA, EA, FA> >(path);

            buffer.ReadTo(mesh, setVertexAttributes, setHedgeAttributes, setFaceAttributes);
        }
示例#4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="path"></param>
        /// <param name="graph"></param>
        /// <param name="setVertexAttributes"></param>
        /// <param name="setHedgeAttributes"></param>
        public static void ReadFromJson <TV, TE, TF>(string path, HeMeshBase <TV, TE, TF> mesh, Action <TV, object[]> setVertexAttributes = null, Action <TE, object[]> setHedgeAttributes = null, Action <TF, object[]> setFaceAttributes = null)
            where TV : HeMeshBase <TV, TE, TF> .Vertex
            where TE : HeMeshBase <TV, TE, TF> .Halfedge
            where TF : HeMeshBase <TV, TE, TF> .Face
        {
            //var buffer = CoreIO.DeserializeJson<HeMeshJsonBuffer>(path);
            var buffer = CoreIO.DeserializeJson <HeJsonBuffer>(path);

            buffer.ReadTo(mesh, setVertexAttributes, setHedgeAttributes, setFaceAttributes);
        }