hyades.ShapeBuilder.PolygonReduce C# (CSharp) 메소드

PolygonReduce() 개인적인 정적인 메소드

private static PolygonReduce ( List shape, float distance ) : List
shape List
distance float
리턴 List
        private static List<Vector2> PolygonReduce(List<Vector2> shape, float distance)
        {
            List<Vector2> output = new List<Vector2>();
            Vector2 key;
            key = shape[0];
            for (int i = 0; i < shape.Count; i++)
            {
                if (Vector2.Distance(shape[i], key) > distance)
                {
                    key = shape[i];
                    output.Add(key);
                }
            }

            return output;
        }