Interface MPolygon2d

    • Method Detail

      • simplify

        void simplify​(double distance)
        Simplifies this polygon by replacing closely grouped vertices with a single vertex. Vertices that are within the given distance of each other are considered closely grouped.
        Parameters:
        distance - the distance used for checking if vertices are closely grouped
        Since:
        9.10.2
      • resize

        void resize​(double resizeAmount)
        Resizes this polygon by the given amount. If the amount is positive, the polygon is enlarged. If the amount is negative, the polygon is reduced in size.
        Parameters:
        resizeAmount - the amount the polygon is resized
        Since:
        9.10.2
      • translate

        void translate​(Vector2d translator)
        Translates the polygon by the given vector in the XY-plane.
        Parameters:
        translator - the vector used for translation
        Since:
        9.10.2
      • create

        static MPolygon2d create​(List<? extends Vector2d> vertices)
        Creates a 2-dimensional polygon with the given vertices. The returned polygon does not take ownership of the given vertices.
        Parameters:
        vertices - the vertices used for creating the returned polygon
        Returns:
        a polygon with the given vertices
        Since:
        9.10.2
      • create

        static MPolygon2d create​(Polygon2d polygon)
        Creates a 2-dimensional polygon with the contents deep copied from the given polygon. The returned polygon does not take ownership of the given vertices.
        Parameters:
        polygon - the polygon whose contents are deep copied into the returned polygon
        Returns:
        a polygon with the contents deep copied from the given polygon
        Since:
        9.10.2