Class RectangularPrism3d
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.d.AbstractShape3d<RectangularPrism3d>
-
- org.arakhne.afc.math.geometry.d3.d.RectangularPrism3d
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Prism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
,RectangularPrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
,Shape3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
,Shape3d<RectangularPrism3d>
,Shape3D<Shape3d<?>,RectangularPrism3d,PathIterator3afp<PathElement3d>,Point3d,Vector3d,RectangularPrism3d>
,JsonableObject
public class RectangularPrism3d extends AbstractShape3d<RectangularPrism3d> implements RectangularPrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
A rectangle with 2 double precision floating-point numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Thomas PIOTROWSKI
- 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.afp.RectangularPrism3afp
RectangularPrism3afp.RectanglePathIterator<T extends PathElement3afp>, RectangularPrism3afp.TransformedRectanglePathIterator<T extends PathElement3afp>
-
-
Constructor Summary
Constructors Constructor Description RectangularPrism3d()
Construct an empty rectangular prism.RectangularPrism3d(double x, double y, double z, double width, double height, double depth)
Construct a rectangle with the given minimum corner and sizes.RectangularPrism3d(RectangularPrism3d rectangularPrism)
Constructor by copy.RectangularPrism3d(Point3D<?,?> min, Point3D<?,?> max)
Construct a rectangular prism with the given minimum and maxium corners.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getMaxX()
Replies the max x.double
getMaxY()
Replies the max y.double
getMaxZ()
Replies the max z.double
getMinX()
Replies the min X.double
getMinY()
Replies the min y.double
getMinZ()
Replies the min z.int
hashCode()
void
setFromCorners(double x1, double y1, double z1, double x2, double y2, double z2)
Change the frame of the rectangular prism conserving previous min and max if needed.void
setMaxX(double x)
Set the max X conserving previous max if needed.void
setMaxY(double y)
Set the max Y conserving previous max if needed.void
setMaxZ(double z)
Set the max Z conserving previous max if needed.void
setMinX(double x)
Set the min X conserving previous min if needed.void
setMinY(double y)
Set the min Y conserving previous min if needed.void
setMinZ(double z)
Set the min Z conserving previous min if needed.-
Methods inherited from class org.arakhne.afc.math.geometry.d3.d.AbstractShape3d
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.afp.Prism3afp
clear, getCenter, getCenterX, getCenterY, getCenterZ, getDepth, getHeight, getWidth, inflate, isEmpty, set, set, setCenter, setCenter, setCenterX, setCenterY, setCenterZ, setDepth, setFromCenter, setFromCenter, setFromCorners, setHeight, setWidth, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.afp.RectangularPrism3afp
add, add, avoidCollisionWith, avoidCollisionWith, contains, contains, createIntersection, createUnion, equalsToShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, intersects, intersects, intersects, intersects, intersects, set, setIntersection, setUnion
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.afp.Shape3afp
contains, contains, createTransformedShape, getClosestPointTo, 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
-
RectangularPrism3d
public RectangularPrism3d()
Construct an empty rectangular prism.
-
RectangularPrism3d
public RectangularPrism3d(Point3D<?,?> min, Point3D<?,?> max)
Construct a rectangular prism with the given minimum and maxium corners.- Parameters:
min
- is the min corner of the rectangular prism.max
- is the max corner of the rectangular prism.
-
RectangularPrism3d
public RectangularPrism3d(double x, double y, double z, double width, double height, double 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.
-
RectangularPrism3d
public RectangularPrism3d(RectangularPrism3d rectangularPrism)
Constructor by copy.- Parameters:
rectangularPrism
- the rectangular prism to copy.
-
-
Method Detail
-
setFromCorners
public void setFromCorners(double x1, double y1, double z1, double x2, double y2, double z2)
Description copied from interface:Prism3afp
Change the frame of the rectangular prism conserving previous min and max if needed.- Specified by:
setFromCorners
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- 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 second corner.
-
getMinX
@Pure public double getMinX()
Description copied from interface:Prism3afp
Replies the min X.- Specified by:
getMinX
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Returns:
- the min x.
-
setMinX
public void setMinX(double x)
Description copied from interface:Prism3afp
Set the min X conserving previous min if needed.- Specified by:
setMinX
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Parameters:
x
- the min x.
-
getMaxX
@Pure public double getMaxX()
Description copied from interface:Prism3afp
Replies the max x.- Specified by:
getMaxX
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Returns:
- the max x.
-
setMaxX
public void setMaxX(double x)
Description copied from interface:Prism3afp
Set the max X conserving previous max if needed.- Specified by:
setMaxX
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Parameters:
x
- the max x.
-
getMinY
@Pure public double getMinY()
Description copied from interface:Prism3afp
Replies the min y.- Specified by:
getMinY
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Returns:
- the min y.
-
setMinY
public void setMinY(double y)
Description copied from interface:Prism3afp
Set the min Y conserving previous min if needed.- Specified by:
setMinY
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Parameters:
y
- the min y.
-
getMaxY
@Pure public double getMaxY()
Description copied from interface:Prism3afp
Replies the max y.- Specified by:
getMaxY
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Returns:
- the max y.
-
setMaxY
public void setMaxY(double y)
Description copied from interface:Prism3afp
Set the max Y conserving previous max if needed.- Specified by:
setMaxY
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Parameters:
y
- the max y.
-
getMinZ
@Pure public double getMinZ()
Description copied from interface:Prism3afp
Replies the min z.- Specified by:
getMinZ
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Returns:
- the min z.
-
setMinZ
public void setMinZ(double z)
Description copied from interface:Prism3afp
Set the min Z conserving previous min if needed.- Specified by:
setMinZ
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Parameters:
z
- the min z.
-
getMaxZ
@Pure public double getMaxZ()
Description copied from interface:Prism3afp
Replies the max z.- Specified by:
getMaxZ
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Returns:
- the max z.
-
setMaxZ
public void setMaxZ(double z)
Description copied from interface:Prism3afp
Set the max Z conserving previous max if needed.- Specified by:
setMaxZ
in interfacePrism3afp<Shape3d<?>,RectangularPrism3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Parameters:
z
- the max z.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCode
in classAbstractShape3d<RectangularPrism3d>
-
-