Class RectangularPrism3i
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.i.AbstractShape3i<RectangularPrism3i>
-
- org.arakhne.afc.math.geometry.d3.i.RectangularPrism3i
-
- All Implemented Interfaces:
Serializable,Cloneable,Prism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>,RectangularPrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>,Shape3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>,Shape3i<RectangularPrism3i>,Shape3D<Shape3i<?>,RectangularPrism3i,PathIterator3ai<PathElement3i>,Point3i,Vector3i,RectangularPrism3i>,JsonableObject
public class RectangularPrism3i extends AbstractShape3i<RectangularPrism3i> implements RectangularPrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
A rectangle with 2 integer numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d3.ai.RectangularPrism3ai
RectangularPrism3ai.RectanglePathIterator<E extends PathElement3ai>, RectangularPrism3ai.RectangleSideIterator<P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>, RectangularPrism3ai.Side, RectangularPrism3ai.TransformedRectanglePathIterator<E extends PathElement3ai>
-
-
Constructor Summary
Constructors Constructor Description RectangularPrism3i()Construct an empty rectangular prism.RectangularPrism3i(int x, int y, int z, int width, int height, int depth)Construct a rectangle with the given minimum corner and sizes.RectangularPrism3i(RectangularPrism3i rectangle)Constructor by copy.RectangularPrism3i(Point3D<?,?> min, Point3D<?,?> max)Construct a rectangular prism with the given minimum and maximum corners.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.inthashCode()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.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.-
Methods inherited from class org.arakhne.afc.math.geometry.d3.i.AbstractShape3i
addShapeGeometryChangeListener, clone, equals, fireGeometryChange, getGeomFactory, removeShapeGeometryChangeListener, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.ai.Prism3ai
clear, getCenterX, getCenterY, getCenterZ, getDepth, getHeight, getWidth, inflate, isEmpty, set, set, setDepth, setFromCenter, setFromCenter, setFromCorners, setHeight, setWidth, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.ai.RectangularPrism3ai
contains, contains, createIntersection, createUnion, equalsToShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, getPointIterator, getPointIterator, intersects, intersects, intersects, intersects, intersects, set, setIntersection, setUnion
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.ai.Shape3ai
contains, contains, createTransformedShape, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, intersects, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Shape3D
clone, equalsToPathIterator, getDistance, getDistance, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
-
-
-
Constructor Detail
-
RectangularPrism3i
public RectangularPrism3i()
Construct an empty rectangular prism.
-
RectangularPrism3i
public RectangularPrism3i(Point3D<?,?> min, Point3D<?,?> max)
Construct a rectangular prism with the given minimum and maximum corners.- Parameters:
min- is the min corner of the rectangular prism.max- is the max corner of the rectangular prism.
-
RectangularPrism3i
public RectangularPrism3i(int x, int y, int z, int width, int height, int depth)Construct a rectangle with the given minimum corner and sizes.- Parameters:
x- x coordinate of the minimum corner.y- y coordinate of the minimum corner.z- z coordinate of the minimum corner.width- width of the rectangular prism.height- height of the rectangular prism.depth- depth of the rectangular prism.
-
RectangularPrism3i
public RectangularPrism3i(RectangularPrism3i rectangle)
Constructor by copy.- Parameters:
rectangle- the rectangular prism to copy.
-
-
Method Detail
-
setFromCorners
public void setFromCorners(int x1, int y1, int z1, int x2, int y2, int z2)Description copied from interface:Prism3aiChange the frame of the prism conserving previous min and max if needed.- Specified by:
setFromCornersin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- 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.
-
getMinX
@Pure public int getMinX()
Description copied from interface:Prism3aiReplies the min X.- Specified by:
getMinXin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Returns:
- the min x.
-
setMinX
public void setMinX(int x)
Description copied from interface:Prism3aiSet the min X conserving previous min if needed.- Specified by:
setMinXin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Parameters:
x- the min x.
-
getMaxX
@Pure public int getMaxX()
Description copied from interface:Prism3aiReplies the max x.- Specified by:
getMaxXin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Returns:
- the max x.
-
setMaxX
public void setMaxX(int x)
Description copied from interface:Prism3aiSet the max X conserving previous max if needed.- Specified by:
setMaxXin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Parameters:
x- the max x.
-
getMinY
@Pure public int getMinY()
Description copied from interface:Prism3aiReplies the min y.- Specified by:
getMinYin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Returns:
- the min y.
-
setMinY
public void setMinY(int y)
Description copied from interface:Prism3aiSet the min Y conserving previous min if needed.- Specified by:
setMinYin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Parameters:
y- the min y.
-
getMaxY
@Pure public int getMaxY()
Description copied from interface:Prism3aiReplies the max y.- Specified by:
getMaxYin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Returns:
- the max y.
-
setMaxY
public void setMaxY(int y)
Description copied from interface:Prism3aiSet the max Y conserving previous max if needed.- Specified by:
setMaxYin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Parameters:
y- the max y.
-
getMinZ
@Pure public int getMinZ()
Description copied from interface:Prism3aiReplies the min z.- Specified by:
getMinZin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Returns:
- the min z.
-
setMinZ
public void setMinZ(int z)
Description copied from interface:Prism3aiSet the min Z conserving previous min if needed.- Specified by:
setMinZin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Parameters:
z- the min z.
-
getMaxZ
@Pure public int getMaxZ()
Description copied from interface:Prism3aiReplies the max z.- Specified by:
getMaxZin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Returns:
- the max z.
-
setMaxZ
public void setMaxZ(int z)
Description copied from interface:Prism3aiSet the max Z conserving previous max if needed.- Specified by:
setMaxZin interfacePrism3ai<Shape3i<?>,RectangularPrism3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Parameters:
z- the max z.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCodein classAbstractShape3i<RectangularPrism3i>
-
-