/// <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)); }
/// <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<TVertex, TCell, TEdge>.</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)); }
/// <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<TVertex, TCell, VoronoiEdge<TVertex, TCell>>.</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)); }
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)); }
/// <summary> /// Create the voronoi mesh. /// </summary> /// <typeparam name="TVertex">The type of the t vertex.</typeparam> /// <param name="data">The data.</param> /// <returns>VoronoiMesh<TVertex, DefaultTriangulationCell<TVertex>, VoronoiEdge<TVertex, DefaultTriangulationCell<TVertex>>>.</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)); }
Create <TVertex>(IList <TVertex> data) where TVertex : IVertex { return (VoronoiMesh <TVertex, DefaultTriangulationCell <TVertex>, VoronoiEdge <TVertex, DefaultTriangulationCell <TVertex> > > .Create(data)); }
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)); }
/// <summary> /// Create the voronoi mesh. /// </summary> /// <param name="data">The data.</param> /// <returns>VoronoiMesh<DefaultVertex, DefaultTriangulationCell<DefaultVertex>, VoronoiEdge<DefaultVertex, DefaultTriangulationCell<DefaultVertex>>>.</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)); }
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)); }
/// <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)); }
/// <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)); }