Interface MultiShape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>

  • Type Parameters:
    ST - is the type of the general implementation.
    IT - is the type of the implementation of this multishape.
    CT - is the type of the shapes that are inside this multishape.
    IE - is the type of the path elements.
    P - is the type of the points.
    V - is the type of the vectors.
    B - is the type of the bounding boxes.
    All Superinterfaces:
    Cloneable, Collection<CT>, Iterable<CT>, JsonableObject, List<CT>, MultiShape2D<ST,​IT,​CT,​PathIterator2afp<IE>,​P,​V,​B>, Serializable, Shape2afp<ST,​IT,​IE,​P,​V,​B>, Shape2D<ST,​IT,​PathIterator2afp<IE>,​P,​V,​B>
    All Known Implementing Classes:
    MultiShape2d, MultiShape2dfx

    public interface MultiShape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
    extends Shape2afp<ST,​IT,​IE,​P,​V,​B>, MultiShape2D<ST,​IT,​CT,​PathIterator2afp<IE>,​P,​V,​B>
    Container for grouping of shapes.

    The coordinates of the shapes inside the multishape are global. They are not relative to the multishape.

    Since:
    13.0
    Version:
    17.0 2020-01-04 14:41:43
    Author:
    $Author: tpiotrowski$, Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    mathgeom
    • Method Detail

      • intersects

        @Pure
        default boolean intersects​(Ellipse2afp<?,​?,​?,​?,​?,​?> ellipse)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given ellipse.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        ellipse - the ellipse.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Circle2afp<?,​?,​?,​?,​?,​?> circle)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given circle.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        circle - the circle.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Rectangle2afp<?,​?,​?,​?,​?,​?> rectangle)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given rectangle.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        rectangle - the rectangle.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Segment2afp<?,​?,​?,​?,​?,​?> segment)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given line.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        segment - the segment.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Triangle2afp<?,​?,​?,​?,​?,​?> triangle)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given triangle.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        triangle - the triangle.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(PathIterator2afp<?> iterator)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the shape representing the given path iterator.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        iterator - the path iterator.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(OrientedRectangle2afp<?,​?,​?,​?,​?,​?> orientedRectangle)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given rectangle.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        orientedRectangle - the oriented rectangle.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Parallelogram2afp<?,​?,​?,​?,​?,​?> parallelogram)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given parallelogram.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        parallelogram - the parallelogram.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(RoundRectangle2afp<?,​?,​?,​?,​?,​?> roundRectangle)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given rectangle.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        roundRectangle - the round rectangle.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(MultiShape2afp<?,​?,​?,​?,​?,​?,​?> multishape)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given multishape.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        multishape - the multishape.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • contains

        @Pure
        default boolean contains​(double x,
                                 double y)
        Description copied from interface: Shape2afp
        Replies if the given point is inside this shape.
        Specified by:
        contains in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        x - x coordinate of the point to test.
        y - y coordinate of the point to test.
        Returns:
        true if the given point is inside this shape, otherwise false.
      • getClosestPointTo

        default P getClosestPointTo​(Circle2afp<?,​?,​?,​?,​?,​?> circle)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given circle.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        circle - the circle.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        default P getClosestPointTo​(Segment2afp<?,​?,​?,​?,​?,​?> segment)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given segment.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        segment - the segment.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        default P getClosestPointTo​(Rectangle2afp<?,​?,​?,​?,​?,​?> rectangle)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given rectangle.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        rectangle - the rectangle.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        default P getClosestPointTo​(RoundRectangle2afp<?,​?,​?,​?,​?,​?> roundRectangle)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given round rectangle.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        roundRectangle - the round rectangle.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        default P getClosestPointTo​(Ellipse2afp<?,​?,​?,​?,​?,​?> ellipse)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given ellipse.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        ellipse - the ellipse.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        default P getClosestPointTo​(Triangle2afp<?,​?,​?,​?,​?,​?> triangle)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given triangle.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        triangle - the triangle.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        default P getClosestPointTo​(OrientedRectangle2afp<?,​?,​?,​?,​?,​?> orientedRectangle)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given oriented rectangle.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        orientedRectangle - the oriented rectangle.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        default P getClosestPointTo​(Parallelogram2afp<?,​?,​?,​?,​?,​?> parallelogram)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given parallelogram.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        parallelogram - the parallelogram.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        default P getClosestPointTo​(Path2afp<?,​?,​?,​?,​?,​?> path)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given path.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        path - the path.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        default P getClosestPointTo​(MultiShape2afp<?,​?,​?,​?,​?,​?,​?> multishape)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given multishape.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends MultiShape2afp<?,​?,​CT,​IE,​P,​V,​B>,​CT extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>>
        Parameters:
        multishape - the multishape.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.