Interface MultiShape3D<ST extends Shape3D<?,​?,​I,​P,​V,​B>,​IT extends MultiShape3D<?,​?,​CT,​I,​P,​V,​B>,​CT extends Shape3D<?,​?,​I,​P,​V,​B>,​I extends PathIterator3D<?>,​P extends Point3D<? super P,​? super V>,​V extends Vector3D<? super V,​? super P>,​B extends Shape3D<?,​?,​I,​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.
    I - is the type of the iterator used to obtain the elements of the path.
    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>, Serializable, Shape3D<ST,​IT,​I,​P,​V,​B>
    All Known Subinterfaces:
    MultiShape3afp<ST,​IT,​CT,​IE,​P,​V,​B>, MultiShape3ai<ST,​IT,​CT,​IE,​P,​V,​B>
    All Known Implementing Classes:
    MultiShape3d, MultiShape3dfx, MultiShape3i, MultiShape3ifx

    public interface MultiShape3D<ST extends Shape3D<?,​?,​I,​P,​V,​B>,​IT extends MultiShape3D<?,​?,​CT,​I,​P,​V,​B>,​CT extends Shape3D<?,​?,​I,​P,​V,​B>,​I extends PathIterator3D<?>,​P extends Point3D<? super P,​? super V>,​V extends Vector3D<? super V,​? super P>,​B extends Shape3D<?,​?,​I,​P,​V,​B>>
    extends Shape3D<ST,​IT,​I,​P,​V,​B>, List<CT>
    Container for grouping of shapes.

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

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

      • getFirstShapeContaining

        @Pure
        default CT getFirstShapeContaining​(Point3D<?,​?> point)
        Get the first shape in this multishape that is containing the given point.
        Parameters:
        point - the point.
        Returns:
        the shape, or null if no shape contains the given point.
      • getShapesContaining

        @Pure
        default List<CT> getShapesContaining​(Point3D<?,​?> point)
        Get the shapes in this multishape that are containing the given point.
        Parameters:
        point - the point.
        Returns:
        the shapes, or an empty list.
      • getFirstShapeIntersecting

        @Pure
        CT getFirstShapeIntersecting​(ST shape)
        Get the first shape in this multishape that is intersecting the given shape.
        Parameters:
        shape - the shape.
        Returns:
        the shape, or null if no shape intersecting the given shape.
      • getShapesIntersecting

        @Pure
        List<CT> getShapesIntersecting​(ST shape)
        Get the shapes in this multishape that are intersecting the given shape.
        Parameters:
        shape - the shape.
        Returns:
        the shapes, or an empty list.
      • getBackendDataList

        @Pure
        List<CT> getBackendDataList()
        Replies the list that contains the backend data.

        Use this function with caution. Indeed, any change made in the replied list has no consequence on the internal attributes of this multishape object.

        Returns:
        the backend data list.
      • onBackendDataChange

        default void onBackendDataChange()
        Invoked each time the backend data has changed.
      • set

        default CT set​(int index,
                       CT element)
        Specified by:
        set in interface List<ST extends Shape3D<?,​?,​I,​P,​V,​B>>
      • equalsToShape

        @Pure
        default boolean equalsToShape​(IT shape)
        Description copied from interface: Shape3D
        Replies this shape is equal to the given shape.
        Specified by:
        equalsToShape in interface Shape3D<ST extends Shape3D<?,​?,​I,​P,​V,​B>,​IT extends MultiShape3D<?,​?,​CT,​I,​P,​V,​B>,​CT extends Shape3D<?,​?,​I,​P,​V,​B>,​I extends PathIterator3D<?>,​P extends Point3D<? super P,​? super V>,​V extends Vector3D<? super V,​? super P>>
        Parameters:
        shape - the shape to compare to.
        Returns:
        true if this shape is equal is equal to the given path.
      • isEmpty

        @Pure
        default boolean isEmpty()
        Description copied from interface: Shape3D
        Replies if this shape is empty. The semantic associated to the state "empty" depends on the implemented shape. See the subclasses for details.
        Specified by:
        isEmpty in interface Collection<ST extends Shape3D<?,​?,​I,​P,​V,​B>>
        Specified by:
        isEmpty in interface List<ST extends Shape3D<?,​?,​I,​P,​V,​B>>
        Specified by:
        isEmpty in interface Shape3D<ST extends Shape3D<?,​?,​I,​P,​V,​B>,​IT extends MultiShape3D<?,​?,​CT,​I,​P,​V,​B>,​CT extends Shape3D<?,​?,​I,​P,​V,​B>,​I extends PathIterator3D<?>,​P extends Point3D<? super P,​? super V>,​V extends Vector3D<? super V,​? super P>>
        Returns:
        true if the shape is empty; false otherwise.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(Point3D<?,​?> point)
        Description copied from interface: Shape3D
        Replies the point on the shape that is closest to the given point.
        Specified by:
        getClosestPointTo in interface Shape3D<ST extends Shape3D<?,​?,​I,​P,​V,​B>,​IT extends MultiShape3D<?,​?,​CT,​I,​P,​V,​B>,​CT extends Shape3D<?,​?,​I,​P,​V,​B>,​I extends PathIterator3D<?>,​P extends Point3D<? super P,​? super V>,​V extends Vector3D<? super V,​? super P>>
        Parameters:
        point - the point.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getDistanceSquared

        @Pure
        default double getDistanceSquared​(Point3D<?,​?> point)
        Description copied from interface: Shape3D
        Replies the squared value of the minimal distance from this shape to the given point.
        Specified by:
        getDistanceSquared in interface Shape3D<ST extends Shape3D<?,​?,​I,​P,​V,​B>,​IT extends MultiShape3D<?,​?,​CT,​I,​P,​V,​B>,​CT extends Shape3D<?,​?,​I,​P,​V,​B>,​I extends PathIterator3D<?>,​P extends Point3D<? super P,​? super V>,​V extends Vector3D<? super V,​? super P>>
        Parameters:
        point - the point.
        Returns:
        squared value of the minimal distance between this shape and the point.
      • getDistanceL1

        @Pure
        default double getDistanceL1​(Point3D<?,​?> point)
        Description copied from interface: Shape3D
        Computes the L-1 (Manhattan) distance between this shape and point p1. The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).
        Specified by:
        getDistanceL1 in interface Shape3D<ST extends Shape3D<?,​?,​I,​P,​V,​B>,​IT extends MultiShape3D<?,​?,​CT,​I,​P,​V,​B>,​CT extends Shape3D<?,​?,​I,​P,​V,​B>,​I extends PathIterator3D<?>,​P extends Point3D<? super P,​? super V>,​V extends Vector3D<? super V,​? super P>>
        Parameters:
        point - the point
        Returns:
        the distance.
      • getDistanceLinf

        @Pure
        default double getDistanceLinf​(Point3D<?,​?> point)
        Description copied from interface: Shape3D
        Computes the L-infinite distance between this shape and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2)].
        Specified by:
        getDistanceLinf in interface Shape3D<ST extends Shape3D<?,​?,​I,​P,​V,​B>,​IT extends MultiShape3D<?,​?,​CT,​I,​P,​V,​B>,​CT extends Shape3D<?,​?,​I,​P,​V,​B>,​I extends PathIterator3D<?>,​P extends Point3D<? super P,​? super V>,​V extends Vector3D<? super V,​? super P>>
        Parameters:
        point - the point.
        Returns:
        the distance.
      • add

        default void add​(int index,
                         CT element)
        Specified by:
        add in interface List<ST extends Shape3D<?,​?,​I,​P,​V,​B>>
      • remove

        default CT remove​(int index)
        Specified by:
        remove in interface List<ST extends Shape3D<?,​?,​I,​P,​V,​B>>
      • addAll

        default boolean addAll​(int index,
                               Collection<? extends CT> collection)
        Specified by:
        addAll in interface List<ST extends Shape3D<?,​?,​I,​P,​V,​B>>
      • get

        @Pure
        default CT get​(int index)
        Specified by:
        get in interface List<ST extends Shape3D<?,​?,​I,​P,​V,​B>>
      • subList

        default List<CT> subList​(int fromIndex,
                                 int toIndex)
        Specified by:
        subList in interface List<ST extends Shape3D<?,​?,​I,​P,​V,​B>>