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>>
-
- Type Parameters:
ST- is the type of the general implementation.IT- is the type of the implementation of this shape.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,JsonableObject,Serializable,Shape3ai<ST,IT,IE,P,V,B>,Shape3D<ST,IT,PathIterator3ai<IE>,P,V,B>
- All Known Subinterfaces:
RectangularPrism3ai<ST,IT,IE,P,V,B>
- All Known Implementing Classes:
AbstractPrism3i,AbstractRectangularShape3ifx,RectangularPrism3i,RectangularPrism3ifx
public 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>> extends Shape3ai<ST,IT,IE,P,V,B>
Fonctional interface that represented a rectangular shape on a plane.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Hamza JAFFALI
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclear()Reset this shape to be equivalent to an just-created instance of this shape type.default intgetCenterX()Replies the center x.default intgetCenterY()Replies the center y.default intgetCenterZ()Replies the center z.default intgetDepth()Replies the depth.default intgetHeight()Replies the height.intgetMaxX()Replies the max x.intgetMaxY()Replies the max y.intgetMaxZ()Replies the max z.intgetMinX()Replies the min X.intgetMinY()Replies the min y.intgetMinZ()Replies the min z.default intgetWidth()Replies the width.default voidinflate(int minXBorder, int minYBorder, int minZBorder, int maxXBorder, int maxYBorder, int maxZBorder)Inflate this prism with the given amounts.default booleanisEmpty()Replies if this shape is empty.default voidset(int x, int y, int z, int width, int height, int depth)Change the frame of the prism.default voidset(Point3D<?,?> min, Point3D<?,?> max)Change the frame of the prism.default voidsetDepth(int depth)Change the depth of the prism, not the min corner.default voidsetFromCenter(int centerX, int centerY, int centerZ, int cornerX, int cornerY, int cornerZ)Sets the framing rectangle of thisShapebased on the specified center point coordinates and corner point coordinates.default voidsetFromCenter(Point3D<?,?> center, Point3D<?,?> corner)Sets the framing rectangle of thisShapebased on the specified center point coordinates and corner point coordinates.voidsetFromCorners(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.default voidsetFromCorners(Point3D<?,?> p1, Point3D<?,?> p2)Change the frame of the prism conserving previous min and max if needed.default voidsetHeight(int height)Change the height of the prism, not the min corner.voidsetMaxX(int x)Set the max X conserving previous max if needed.voidsetMaxY(int y)Set the max Y conserving previous max if needed.voidsetMaxZ(int z)Set the max Z conserving previous max if needed.voidsetMinX(int x)Set the min X conserving previous min if needed.voidsetMinY(int y)Set the min Y conserving previous min if needed.voidsetMinZ(int z)Set the min Z conserving previous min if needed.default voidsetWidth(int width)Change the width of the prism, not the min corner.default voidtoBoundingBox(B box)Replies the bounds of the shape.default voidtranslate(int dx, int dy, int dz)Translate the shape.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.ai.Shape3ai
contains, contains, contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, getPointIterator, intersects, intersects, intersects, intersects, intersects, intersects, intersects, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Shape3D
clone, equalsToPathIterator, equalsToShape, getClosestPointTo, getDistance, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo, set
-
-
-
-
Method Detail
-
toBoundingBox
default void toBoundingBox(B box)
Description copied from interface:Shape3DReplies the bounds of the shape.- Specified by:
toBoundingBoxin interfaceShape3D<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>>- Parameters:
box- is set with the bounds of the shape.
-
clear
default void clear()
Description copied from interface:Shape3DReset this shape to be equivalent to an just-created instance of this shape type.
-
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 thisShapebased on the specified center point coordinates and corner point coordinates. The framing rectangle is used by the subclasses ofRectangularShapeto define their geometry.- Parameters:
centerX- the X coordinate of the specified center pointcenterY- the Y coordinate of the specified center pointcenterZ- the Z coordinate of the specified center pointcornerX- the X coordinate of the specified corner pointcornerY- the Y coordinate of the specified corner pointcornerZ- the Z coordinate of the specified corner point
-
setFromCenter
default void setFromCenter(Point3D<?,?> center, Point3D<?,?> corner)
Sets the framing rectangle of thisShapebased on the specified center point coordinates and corner point coordinates. The framing rectangle is used by the subclasses ofRectangularShapeto define their geometry.- Parameters:
center- the specified center pointcorner- 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.
-
translate
default void translate(int dx, int dy, int dz)Description copied from interface:Shape3aiTranslate the shape.- Specified by:
translatein interfaceShape3ai<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>>- Parameters:
dx- x translation.dy- y translation.dz- z translation.
-
isEmpty
@Pure default boolean isEmpty()
Description copied from interface:Shape3DReplies if this shape is empty. The semantic associated to the state "empty" depends on the implemented shape. See the subclasses for details.- Specified by:
isEmptyin interfaceShape3D<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:
trueif the shape is empty;falseotherwise.
-
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.
-
-