Set of tools for processing collection of points in 2D space.

The static class contains set of routines, which provide different operations with collection of points in 2D space. For example, finding the furthest point from a specified point or line.

Sample usage:

// create points' list List<IntPoint> points = new List<IntPoint>( ); points.Add( new IntPoint( 10, 10 ) ); points.Add( new IntPoint( 20, 15 ) ); points.Add( new IntPoint( 15, 30 ) ); points.Add( new IntPoint( 40, 12 ) ); points.Add( new IntPoint( 30, 20 ) ); // get furthest point from the specified point IntPoint p1 = PointsCloud.GetFurthestPoint( points, new IntPoint( 15, 15 ) ); Console.WriteLine( p1.X + ", " + p1.Y ); // get furthest point from line IntPoint p2 = PointsCloud.GetFurthestPointFromLine( points, new IntPoint( 50, 0 ), new IntPoint( 0, 50 ) ); Console.WriteLine( p2.X + ", " + p2.Y );
Ejemplo n.º 1
0
 private List <IntPoint> GetShapeCorners(List <IntPoint> edgePoints)
 {
     return(shapeOptimizer.OptimizeShape(PointsCloud.FindQuadrilateralCorners(edgePoints)));
 }