示例#1
0
 /// <summary>
 /// Create the voronoi mesh.
 /// </summary>
 /// <typeparam name="TVertex"></typeparam>
 /// <typeparam name="TCell"></typeparam>
 /// <typeparam name="TEdge"></typeparam>
 /// <param name="data"></param>
 /// <returns></returns>
 public static VoronoiMesh <TVertex, TCell, TEdge> Create <TVertex, TCell, TEdge>(IEnumerable <TVertex> data)
     where TCell : TriangulationCell <TVertex, TCell>, new()
     where TVertex : IVertex
     where TEdge : VoronoiEdge <TVertex, TCell>, new()
 {
     return(VoronoiMesh <TVertex, TCell, TEdge> .Create(data));
 }
 /// <summary>
 /// Create the voronoi mesh.
 /// </summary>
 /// <typeparam name="TVertex"></typeparam>
 /// <typeparam name="TCell"></typeparam>
 /// <typeparam name="TEdge"></typeparam>
 /// <param name="data"></param>
 /// <param name="config">If null, default TriangulationComputationConfig is used.</param>
 /// <returns></returns>
 public static VoronoiMesh <TVertex, TCell, TEdge> Create <TVertex, TCell, TEdge>(IList <TVertex> data, TriangulationComputationConfig config = null)
     where TCell : TriangulationCell <TVertex, TCell>, new()
     where TVertex : IVertex
     where TEdge : VoronoiEdge <TVertex, TCell>, new()
 {
     return(VoronoiMesh <TVertex, TCell, TEdge> .Create(data, config));
 }
示例#3
0
 /// <summary>
 /// Create the voronoi mesh.
 /// </summary>
 /// <typeparam name="TVertex">The type of the t vertex.</typeparam>
 /// <typeparam name="TCell">The type of the t cell.</typeparam>
 /// <typeparam name="TEdge">The type of the t edge.</typeparam>
 /// <param name="data">The data.</param>
 /// <returns>VoronoiMesh&lt;TVertex, TCell, TEdge&gt;.</returns>
 public static VoronoiMesh <TVertex, TCell, TEdge> Create <TVertex, TCell, TEdge>(IList <TVertex> data, double PlaneDistanceTolerance = Constants.DefaultPlaneDistanceTolerance)
     where TCell : TriangulationCell <TVertex, TCell>, new()
     where TVertex : IVertex
     where TEdge : VoronoiEdge <TVertex, TCell>, new()
 {
     return(VoronoiMesh <TVertex, TCell, TEdge> .Create(data, PlaneDistanceTolerance));
 }
示例#4
0
 /// <summary>
 /// Create the voronoi mesh.
 /// </summary>
 /// <typeparam name="TVertex">The type of the t vertex.</typeparam>
 /// <typeparam name="TCell">The type of the t cell.</typeparam>
 /// <param name="data">The data.</param>
 /// <returns>VoronoiMesh&lt;TVertex, TCell, VoronoiEdge&lt;TVertex, TCell&gt;&gt;.</returns>
 public static VoronoiMesh <TVertex, TCell, VoronoiEdge <TVertex, TCell> > Create <TVertex, TCell>(
     IList <TVertex> data)
     where TVertex : IVertex
     where TCell : TriangulationCell <TVertex, TCell>, new()
 {
     return(VoronoiMesh <TVertex, TCell, VoronoiEdge <TVertex, TCell> > .Create(data));
 }
        Create(IList <double[]> data, TriangulationComputationConfig config = null)
        {
            var points = data.Select(p => new DefaultVertex {
                Position = p.ToArray()
            }).ToList();

            return(VoronoiMesh <DefaultVertex, DefaultTriangulationCell <DefaultVertex>, VoronoiEdge <DefaultVertex, DefaultTriangulationCell <DefaultVertex> > > .Create(points, config));
        }
示例#6
0
        Create(IEnumerable <double[]> data)
        {
            var points = data.Select(p => new DefaultVertex {
                Position = p.ToArray()
            });

            return(VoronoiMesh <DefaultVertex, DefaultTriangulationCell <DefaultVertex>, VoronoiEdge <DefaultVertex, DefaultTriangulationCell <DefaultVertex> > > .Create(points));
        }
示例#7
0
 /// <summary>
 /// Create the voronoi mesh.
 /// </summary>
 /// <typeparam name="TVertex">The type of the t vertex.</typeparam>
 /// <param name="data">The data.</param>
 /// <returns>VoronoiMesh&lt;TVertex, DefaultTriangulationCell&lt;TVertex&gt;, VoronoiEdge&lt;TVertex, DefaultTriangulationCell&lt;TVertex&gt;&gt;&gt;.</returns>
 public static VoronoiMesh <TVertex, DefaultTriangulationCell <TVertex>, VoronoiEdge <TVertex, DefaultTriangulationCell <TVertex> > > Create <TVertex>(IList <TVertex> data, double PlaneDistanceTolerance = Constants.DefaultPlaneDistanceTolerance)
     where TVertex : IVertex
 {
     return
         (VoronoiMesh
          <TVertex, DefaultTriangulationCell <TVertex>, VoronoiEdge <TVertex, DefaultTriangulationCell <TVertex> >
          > .Create(data, PlaneDistanceTolerance));
 }
示例#8
0
 Create <TVertex>(IList <TVertex> data)
     where TVertex : IVertex
 {
     return
         (VoronoiMesh
          <TVertex, DefaultTriangulationCell <TVertex>, VoronoiEdge <TVertex, DefaultTriangulationCell <TVertex> >
          > .Create(data));
 }
示例#9
0
        public static VoronoiMesh <DefaultVertex, DefaultTriangulationCell <DefaultVertex>, VoronoiEdge <DefaultVertex, DefaultTriangulationCell <DefaultVertex> > > Create(IList <double[]> data)
        {
            List <DefaultVertex> data2 = (from p in data
                                          select new DefaultVertex
            {
                Position = p.ToArray()
            }).ToList();

            return(VoronoiMesh <DefaultVertex, DefaultTriangulationCell <DefaultVertex>, VoronoiEdge <DefaultVertex, DefaultTriangulationCell <DefaultVertex> > > .Create(data2));
        }
示例#10
0
        /// <summary>
        /// Create the voronoi mesh.
        /// </summary>
        /// <param name="data">The data.</param>
        /// <returns>VoronoiMesh&lt;DefaultVertex, DefaultTriangulationCell&lt;DefaultVertex&gt;, VoronoiEdge&lt;DefaultVertex, DefaultTriangulationCell&lt;DefaultVertex&gt;&gt;&gt;.</returns>
        public static VoronoiMesh <DefaultVertex, DefaultTriangulationCell <DefaultVertex>, VoronoiEdge <DefaultVertex, DefaultTriangulationCell <DefaultVertex> > > Create(IList <double[]> data, double PlaneDistanceTolerance = Constants.DefaultPlaneDistanceTolerance)
        {
            var points = data.Select(p => new DefaultVertex {
                Position = p.ToArray()
            }).ToList();

            return
                (VoronoiMesh
                 <DefaultVertex, DefaultTriangulationCell <DefaultVertex>,
                  VoronoiEdge <DefaultVertex, DefaultTriangulationCell <DefaultVertex> > > .Create(points, PlaneDistanceTolerance));
        }
示例#11
0
        Create(IEnumerable <float[]> data)
        {
            List <DefaultVertex> points = new List <DefaultVertex>();

            foreach (float[] d in data)
            {
                points.Add(new DefaultVertex(d));
            }

            return(VoronoiMesh <DefaultVertex, DefaultTriangulationCell <DefaultVertex>, VoronoiEdge <DefaultVertex, DefaultTriangulationCell <DefaultVertex> > > .Create(points));
        }
示例#12
0
 /// <summary>
 /// Create the voronoi mesh.
 /// </summary>
 /// <typeparam name="TVertex"></typeparam>
 /// <param name="data"></param>
 /// <param name="config">If null, default TriangulationComputationConfig is used.</param>
 /// <returns></returns>
 public static VoronoiMesh <TVertex, DefaultTriangulationCell <TVertex>, VoronoiEdge <TVertex, DefaultTriangulationCell <TVertex> > > Create <TVertex>(IList <TVertex> data, TriangulationComputationConfig config = null)
     where TVertex : IVertex
 {
     return(VoronoiMesh <TVertex, DefaultTriangulationCell <TVertex>, VoronoiEdge <TVertex, DefaultTriangulationCell <TVertex> > > .Create(data, config));
 }
示例#13
0
 /// <summary>
 /// Create the voronoi mesh.
 /// </summary>
 /// <typeparam name="TVertex"></typeparam>
 /// <param name="data"></param>
 /// <returns></returns>
 public static VoronoiMesh <TVertex, DefaultTriangulationCell <TVertex>, VoronoiEdge <TVertex, DefaultTriangulationCell <TVertex> > > Create <TVertex>(IEnumerable <TVertex> data)
     where TVertex : IVertex
 {
     return(VoronoiMesh <TVertex, DefaultTriangulationCell <TVertex>, VoronoiEdge <TVertex, DefaultTriangulationCell <TVertex> > > .Create(data));
 }