Interface Prism3ai<ST extends Shape3ai<?,​?,​IE,​P,​V,​B>,​IT extends Prism3ai<?,​?,​IE,​P,​V,​B>,​IE extends PathElement3ai,​P extends Point3D<? super P,​? super V>,​V extends Vector3D<? super V,​? super P>,​B extends RectangularPrism3ai<?,​?,​IE,​P,​V,​B>>

    • Method Detail

      • set

        default void set​(int x,
                         int y,
                         int z,
                         int width,
                         int height,
                         int depth)
        Change the frame of the prism.
        Parameters:
        x - x coordinate of the lower corner.
        y - y coordinate of the lower corner.
        z - z coordinate of the lower corner.
        width - width of the prism.
        height - height of the prism.
        depth - depth of the prism.
      • set

        default void set​(Point3D<?,​?> min,
                         Point3D<?,​?> max)
        Change the frame of the prism.
        Parameters:
        min - is the min corner of the prism.
        max - is the max corner of the prism.
      • setWidth

        default void setWidth​(int width)
        Change the width of the prism, not the min corner.
        Parameters:
        width - the width of the prism.
      • setHeight

        default void setHeight​(int height)
        Change the height of the prism, not the min corner.
        Parameters:
        height - the height of the prism.
      • setDepth

        default void setDepth​(int depth)
        Change the depth of the prism, not the min corner.
        Parameters:
        depth - the depth of the prism
      • setFromCorners

        void setFromCorners​(int x1,
                            int y1,
                            int z1,
                            int x2,
                            int y2,
                            int z2)
        Change the frame of the prism conserving previous min and max if needed.
        Parameters:
        x1 - is the coordinate of the first corner.
        y1 - is the coordinate of the first corner.
        z1 - is the coordinate of the first corner.
        x2 - is the coordinate of the second corner.
        y2 - is the coordinate of the second corner.
        z2 - is the coordinate of the first corner.
      • setFromCorners

        default void setFromCorners​(Point3D<?,​?> p1,
                                    Point3D<?,​?> p2)
        Change the frame of the prism conserving previous min and max if needed.
        Parameters:
        p1 - the first corner.
        p2 - the second corner.
      • setFromCenter

        default void setFromCenter​(int centerX,
                                   int centerY,
                                   int centerZ,
                                   int cornerX,
                                   int cornerY,
                                   int cornerZ)
        Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
        Parameters:
        centerX - the X coordinate of the specified center point
        centerY - the Y coordinate of the specified center point
        centerZ - the Z coordinate of the specified center point
        cornerX - the X coordinate of the specified corner point
        cornerY - the Y coordinate of the specified corner point
        cornerZ - the Z coordinate of the specified corner point
      • setFromCenter

        default void setFromCenter​(Point3D<?,​?> center,
                                   Point3D<?,​?> corner)
        Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
        Parameters:
        center - the specified center point
        corner - the specified corner point
      • getMinX

        @Pure
        int getMinX()
        Replies the min X.
        Returns:
        the min x.
      • setMinX

        void setMinX​(int x)
        Set the min X conserving previous min if needed.
        Parameters:
        x - the min x.
      • getCenterX

        @Pure
        default int getCenterX()
        Replies the center x.
        Returns:
        the center x.
      • getMaxX

        @Pure
        int getMaxX()
        Replies the max x.
        Returns:
        the max x.
      • setMaxX

        void setMaxX​(int x)
        Set the max X conserving previous max if needed.
        Parameters:
        x - the max x.
      • getMinY

        @Pure
        int getMinY()
        Replies the min y.
        Returns:
        the min y.
      • setMinY

        void setMinY​(int y)
        Set the min Y conserving previous min if needed.
        Parameters:
        y - the min y.
      • getCenterY

        @Pure
        default int getCenterY()
        Replies the center y.
        Returns:
        the center y.
      • getMaxY

        @Pure
        int getMaxY()
        Replies the max y.
        Returns:
        the max y.
      • setMaxY

        void setMaxY​(int y)
        Set the max Y conserving previous max if needed.
        Parameters:
        y - the max y.
      • getMinZ

        @Pure
        int getMinZ()
        Replies the min z.
        Returns:
        the min z.
      • setMinZ

        void setMinZ​(int z)
        Set the min Z conserving previous min if needed.
        Parameters:
        z - the min z.
      • getCenterZ

        @Pure
        default int getCenterZ()
        Replies the center z.
        Returns:
        the center z.
      • getMaxZ

        @Pure
        int getMaxZ()
        Replies the max z.
        Returns:
        the max z.
      • setMaxZ

        void setMaxZ​(int z)
        Set the max Z conserving previous max if needed.
        Parameters:
        z - the max z.
      • getWidth

        @Pure
        default int getWidth()
        Replies the width.
        Returns:
        the width.
      • getHeight

        @Pure
        default int getHeight()
        Replies the height.
        Returns:
        the height.
      • getDepth

        @Pure
        default int getDepth()
        Replies the depth.
        Returns:
        the depth.
      • 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 Shape3D<ST extends Shape3ai<?,​?,​IE,​P,​V,​B>,​IT extends Prism3ai<?,​?,​IE,​P,​V,​B>,​IE extends PathElement3ai,​P extends Point3D<? super P,​? super V>,​V extends Vector3D<? super V,​? super P>,​B extends RectangularPrism3ai<?,​?,​IE,​P,​V,​B>>
        Returns:
        true if the shape is empty; false otherwise.
      • inflate

        default void inflate​(int minXBorder,
                             int minYBorder,
                             int minZBorder,
                             int maxXBorder,
                             int maxYBorder,
                             int maxZBorder)
        Inflate this prism with the given amounts.

        All borders may be inflated. If the value associated to a border is positive, the border is moved outside the current rectangle. If the value is negative, the border is moved inside the rectangle.

        Parameters:
        minXBorder - the value to substract to the minimum x.
        minYBorder - the value to substract to the minimum y.
        minZBorder - the value to substract to the minimum z.
        maxXBorder - the value to add to the maximum x.
        maxYBorder - the value to add to the maximum y.
        maxZBorder - the value to add to the maximum z.