Interface RectangularPrism3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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,Prism3ai<ST,IT,IE,P,V,B>,Serializable,Shape3ai<ST,IT,IE,P,V,B>,Shape3D<ST,IT,PathIterator3ai<IE>,P,V,B>
- All Known Implementing Classes:
RectangularPrism3i,RectangularPrism3ifx
public interface RectangularPrism3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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 Prism3ai<ST,IT,IE,P,V,B>
Fonctional interface that represented a 2D rectangle 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRectangularPrism3ai.RectanglePathIterator<E extends PathElement3ai>Iterator on the path elements of the rectangle.static classRectangularPrism3ai.RectangleSideIterator<P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>Iterates on points on the sides of a rectangle.static classRectangularPrism3ai.SideSides of a prism.static classRectangularPrism3ai.TransformedRectanglePathIterator<E extends PathElement3ai>Iterator on the path elements of the rectangle.
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static voidcomputeClosestPoint(int minx, int miny, int minz, int maxx, int maxy, int maxz, int px, int py, int pz, Point3D<?,?> result)Compute the closest point on the rectangle from the given point.static voidcomputeFarthestPoint(int minx, int miny, int minz, int maxx, int maxy, int maxz, int px, int py, int pz, Point3D<?,?> result)Compute the farthest point on the rectangle from the given point.default booleancontains(int x, int y, int z)Replies if the given point is inside this shape.default booleancontains(RectangularPrism3ai<?,?,?,?,?,?> box)Replies if the given rectangle is inside this shape.default BcreateIntersection(Prism3ai<?,?,?,?,?,?> prism)Compute and replies the intersection of this rectangular prism and the given prism.default BcreateUnion(Prism3ai<?,?,?,?,?,?> prism)Compute and replies the union of this rectangular prism and the given prism.default booleanequalsToShape(IT shape)Replies this shape is equal to the given shape.default PgetClosestPointTo(MultiShape3ai<?,?,?,?,?,?,?> multishape)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(Path3ai<?,?,?,?,?,?> path)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(RectangularPrism3ai<?,?,?,?,?,?> rectangle)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(Segment3ai<?,?,?,?,?,?> segment)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(Sphere3ai<?,?,?,?,?,?> circle)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(Point3D<?,?> pt)Replies the point on the shape that is closest to the given point.default doublegetDistanceL1(Point3D<?,?> pt)Computes the L-1 (Manhattan) distance between this shape and point p1.default doublegetDistanceLinf(Point3D<?,?> pt)Computes the L-infinite distance between this shape and point p1.default doublegetDistanceSquared(Point3D<?,?> pt)Replies the squared value of the minimal distance from this shape to the given point.default PgetFarthestPointTo(Point3D<?,?> pt)Replies the point on the shape that is farthest the given point.default PathIterator3ai<IE>getPathIterator(Transform3D transform)Replies the elements of the paths.default Iterator<P>getPointIterator()Replies an iterator on the points covered by the perimeter of this shape.default Iterator<P>getPointIterator(RectangularPrism3ai.Side startingBorder)Replies the points on the bounds of the rectangle.default booleanintersects(MultiShape3ai<?,?,?,?,?,?,?> multishape)Replies if this shape is intersecting the given multishape.default booleanintersects(PathIterator3ai<?> iterator)Replies if this shape is intersecting the path described by the given iterator.default booleanintersects(RectangularPrism3ai<?,?,?,?,?,?> rectangularPrism)Replies if this shape is intersecting the given rectangular prism.default booleanintersects(Segment3ai<?,?,?,?,?,?> segment)Replies if this shape is intersecting the given segment.default booleanintersects(Sphere3ai<?,?,?,?,?,?> sphere)Replies if this shape is intersecting the given sphere.static booleanintersectsRectangleRectangle(int x1, int y1, int z1, int x2, int y2, int z2, int x3, int y3, int z3, int x4, int y4, int z4)Replies if two rectangles are intersecting.static booleanintersectsRectangleSegment(int x1, int y1, int z1, int x2, int y2, int z2, int x3, int y3, int z3, int x4, int y4, int z4)Replies if a rectangle is intersecting a segment.static intreduceCohenSutherlandZoneRectangularPrismSegment(int rx1, int ry1, int rz1, int rx2, int ry2, int rz2, int sx1, int sy1, int sz1, int sx2, int sy2, int sz2, int codePoint1, int codePoint2, Point3D<?,?> newSegmentP1, Point3D<?,?> newSegmentP2)Update the given Cohen-Sutherland code that corresponds to the given segment in order to obtain a segment restricted to a single Cohen-Sutherland zone.default voidset(IT rectangularPrism)Set this shape with the attributes of the given shape.default voidsetIntersection(Prism3ai<?,?,?,?,?,?> prism)Compute the intersection of this rectangular prism and the given prism.default voidsetUnion(Prism3ai<?,?,?,?,?,?> prism)Compute the union of this rectangular prism and the given prism.-
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, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getWidth, inflate, isEmpty, set, set, setDepth, setFromCenter, setFromCenter, setFromCorners, setFromCorners, setHeight, setMaxX, setMaxY, setMaxZ, setMinX, setMinY, setMinZ, setWidth, toBoundingBox, translate
-
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
-
-
-
-
Method Detail
-
intersectsRectangleRectangle
@Pure static boolean intersectsRectangleRectangle(int x1, int y1, int z1, int x2, int y2, int z2, int x3, int y3, int z3, int x4, int y4, int z4)Replies if two rectangles are intersecting.- Parameters:
x1- is the first corner of the first rectangle.y1- is the first corner of the first rectangle.z1- is the first corner of the first rectangle.x2- is the second corner of the first rectangle.y2- is the second corner of the first rectangle.z2- is the second corner of the first rectangle.x3- is the first corner of the second rectangle.y3- is the first corner of the second rectangle.z3- is the first corner of the second rectangle.x4- is the second corner of the second rectangle.y4- is the second corner of the second rectangle.z4- is the second corner of the second rectangle.- Returns:
trueif the two shapes are intersecting; otherwisefalse
-
intersectsRectangleSegment
@Pure static boolean intersectsRectangleSegment(int x1, int y1, int z1, int x2, int y2, int z2, int x3, int y3, int z3, int x4, int y4, int z4)Replies if a rectangle is intersecting a segment.The intersection test is partly based on the Cohen-Sutherland classification of the segment. This classification permits to detect the base cases; and to run a clipping-like algorithm for the intersection detection.
- Parameters:
x1- is the first corner of the rectangle.y1- is the first corner of the rectangle.z1- is the first corner of the rectangle.x2- is the second corner of the rectangle.y2- is the second corner of the rectangle.z2- is the second corner of the rectangle.x3- is the first point of the segment.y3- is the first point of the segment.z3- is the first point of the segment.x4- is the second point of the segment.y4- is the second point of the segment.z4- is the second point of the segment.- Returns:
trueif the two shapes are intersecting; otherwisefalse
-
computeClosestPoint
@Pure static void computeClosestPoint(int minx, int miny, int minz, int maxx, int maxy, int maxz, int px, int py, int pz, Point3D<?,?> result)Compute the closest point on the rectangle from the given point.- Parameters:
minx- is the x-coordinate of the lowest coordinate of the rectangle.miny- is the y-coordinate of the lowest coordinate of the rectangle.minz- is the z-coordinate of the lowest coordinate of the rectangle.maxx- is the x-coordinate of the highest coordinate of the rectangle.maxy- is the y-coordinate of the highest coordinate of the rectangle.maxz- is the z-coordinate of the highest coordinate of the rectangle.px- is the x-coordinate of the point.py- is the y-coordinate of the point.pz- is the z-coordinate of the point.result- the closest point.
-
computeFarthestPoint
@Pure static void computeFarthestPoint(int minx, int miny, int minz, int maxx, int maxy, int maxz, int px, int py, int pz, Point3D<?,?> result)Compute the farthest point on the rectangle from the given point.- Parameters:
minx- is the x-coordinate of the lowest coordinate of the rectangle.miny- is the y-coordinate of the lowest coordinate of the rectangle.minz- is the z-coordinate of the lowest coordinate of the rectangle.maxx- is the x-coordinate of the highest coordinate of the rectangle.maxy- is the y-coordinate of the highest coordinate of the rectangle.maxz- is the z-coordinate of the highest coordinate of the rectangle.px- is the x-coordinate of the point.py- is the y-coordinate of the point.pz- is the z-coordinate of the point.result- the farthest point.
-
reduceCohenSutherlandZoneRectangularPrismSegment
@Pure static int reduceCohenSutherlandZoneRectangularPrismSegment(int rx1, int ry1, int rz1, int rx2, int ry2, int rz2, int sx1, int sy1, int sz1, int sx2, int sy2, int sz2, int codePoint1, int codePoint2, Point3D<?,?> newSegmentP1, Point3D<?,?> newSegmentP2)Update the given Cohen-Sutherland code that corresponds to the given segment in order to obtain a segment restricted to a single Cohen-Sutherland zone. This function is at the heart of the Cohen-Sutherland algorithm.The result of this function may be:
- the code for a single zone, or
- the code that corresponds to a single column, or
- the code that corresponds to a single row.
- Parameters:
rx1- is the first corner of the rectangle.ry1- is the first corner of the rectangle.rz1- is the first corner of the rectangle.rx2- is the second corner of the rectangle.ry2- is the second corner of the rectangle.rz2- is the second corner of the rectangle.sx1- is the first point of the segment.sy1- is the first point of the segment.sz1- is the first point of the segment.sx2- is the second point of the segment.sy2- is the second point of the segment.sz2- is the second point of the segment.codePoint1- the Cohen-Sutherland code for the first point of the segment.codePoint2- the Cohen-Sutherland code for the second point of the segment.newSegmentP1- is set with the new coordinates of the segment first point. Ifnull, this parameter is ignored.newSegmentP2- is set with the new coordinates of the segment second point. Ifnull, this parameter is ignored.- Returns:
- the rectricted Cohen-Sutherland zone.
-
equalsToShape
@Pure default boolean equalsToShape(IT shape)
Description copied from interface:Shape3DReplies this shape is equal to the given shape.- Specified by:
equalsToShapein interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
shape- the shape to compare to.- Returns:
trueif this shape is equal is equal to the given path.
-
intersects
@Pure default boolean intersects(RectangularPrism3ai<?,?,?,?,?,?> rectangularPrism)
Description copied from interface:Shape3aiReplies if this shape is intersecting the given rectangular prism.- Specified by:
intersectsin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
rectangularPrism- the rectangular prism.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Sphere3ai<?,?,?,?,?,?> sphere)
Description copied from interface:Shape3aiReplies if this shape is intersecting the given sphere.- Specified by:
intersectsin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
sphere- the sphere- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Segment3ai<?,?,?,?,?,?> segment)
Description copied from interface:Shape3aiReplies if this shape is intersecting the given segment.- Specified by:
intersectsin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
segment- the segment- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(PathIterator3ai<?> iterator)
Description copied from interface:Shape3aiReplies if this shape is intersecting the path described by the given iterator.- Specified by:
intersectsin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
iterator- the path Iterator- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(MultiShape3ai<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape3aiReplies if this shape is intersecting the given multishape.- Specified by:
intersectsin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
multishape- the Ăčmultishape- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
contains
@Pure default boolean contains(int x, int y, int z)Description copied from interface:Shape3aiReplies if the given point is inside this shape.- Specified by:
containsin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
x- x coordinate of the point to test.y- y coordinate of the point to test.z- z coordinate of the point to test.- Returns:
trueif the given point is inside this shape, otherwisefalse.
-
contains
@Pure default boolean contains(RectangularPrism3ai<?,?,?,?,?,?> box)
Description copied from interface:Shape3aiReplies if the given rectangle is inside this shape.- Specified by:
containsin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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- the rectangle to test.- Returns:
trueif the given box is inside the shape.
-
set
default void set(IT rectangularPrism)
Description copied from interface:Shape3DSet this shape with the attributes of the given shape.- Specified by:
setin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
rectangularPrism- the shape.
-
getClosestPointTo
@Pure default P getClosestPointTo(Point3D<?,?> pt)
Description copied from interface:Shape3DReplies the point on the shape that is closest to the given point.- Specified by:
getClosestPointToin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
pt- the point.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(RectangularPrism3ai<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape3aiReplies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointToin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
rectangle- the rectangle.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(Sphere3ai<?,?,?,?,?,?> circle)
Description copied from interface:Shape3aiReplies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointToin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
circle- the circle.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(Segment3ai<?,?,?,?,?,?> segment)
Description copied from interface:Shape3aiReplies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointToin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
segment- the segment.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(MultiShape3ai<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape3aiReplies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointToin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
multishape- the multishape.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(Path3ai<?,?,?,?,?,?> path)
Description copied from interface:Shape3aiReplies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointToin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
path- the path.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getFarthestPointTo
@Pure default P getFarthestPointTo(Point3D<?,?> pt)
Description copied from interface:Shape3DReplies the point on the shape that is farthest the given point.- Specified by:
getFarthestPointToin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
pt- the point.- Returns:
- the farthest point on the shape.
-
getDistanceSquared
@Pure default double getDistanceSquared(Point3D<?,?> pt)
Description copied from interface:Shape3DReplies the squared value of the minimal distance from this shape to the given point.- Specified by:
getDistanceSquaredin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
pt- the point.- Returns:
- squared value of the minimal distance between this shape and the point.
-
getDistanceL1
@Pure default double getDistanceL1(Point3D<?,?> pt)
Description copied from interface:Shape3DComputes 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:
getDistanceL1in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
pt- the point- Returns:
- the distance.
-
getDistanceLinf
@Pure default double getDistanceLinf(Point3D<?,?> pt)
Description copied from interface:Shape3DComputes 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:
getDistanceLinfin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
pt- the point.- Returns:
- the distance.
-
getPointIterator
@Pure default Iterator<P> getPointIterator()
Description copied from interface:Shape3aiReplies an iterator on the points covered by the perimeter of this shape.The implementation of the iterator depends on the shape type. There is no warranty about the order of the points.
- Specified by:
getPointIteratorin interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
- an iterator on the points that are located at the perimeter of the shape.
-
getPointIterator
@Pure default Iterator<P> getPointIterator(RectangularPrism3ai.Side startingBorder)
Replies the points on the bounds of the rectangle.- Parameters:
startingBorder- is the first border to reply.- Returns:
- the points on the bounds of the rectangle.
-
getPathIterator
default PathIterator3ai<IE> getPathIterator(Transform3D transform)
Description copied from interface:Shape3DReplies the elements of the paths.- Specified by:
getPathIteratorin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends RectangularPrism3ai<?,?,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:
transform- is the transformation to apply to the path.- Returns:
- the elements of the path.
-
createUnion
@Pure default B createUnion(Prism3ai<?,?,?,?,?,?> prism)
Compute and replies the union of this rectangular prism and the given prism. This function does not change this rectangular prism.It is equivalent to (where
uris the union):RectangularPrism3d ur = new RectangularPrism3d(this); ur.setUnion(r);- Parameters:
prism- the prism- Returns:
- the union of this rectangle and the given rectangle.
- See Also:
setUnion(Prism3ai)
-
createIntersection
@Pure default B createIntersection(Prism3ai<?,?,?,?,?,?> prism)
Compute and replies the intersection of this rectangular prism and the given prism. This function does not change this rectangular prism.It is equivalent to (where
iris the union):RectangularPrism3d ir = new RectangularPrism3d(this); ur.setIntersection(r);- Parameters:
prism- the prism- Returns:
- the intersection of this rectangle and the given rectangle.
- See Also:
setIntersection(Prism3ai)
-
setUnion
default void setUnion(Prism3ai<?,?,?,?,?,?> prism)
Compute the union of this rectangular prism and the given prism. This function changes this rectangular prism.- Parameters:
prism- the prism- See Also:
createUnion(Prism3ai)
-
setIntersection
default void setIntersection(Prism3ai<?,?,?,?,?,?> prism)
Compute the intersection of this rectangular prism and the given prism. This function changes this rectangular prism.If there is no intersection, this rectangular Prism is cleared.
- Parameters:
prism- the prism- See Also:
createIntersection(Prism3ai),Prism3ai.clear()
-
-