Interface OrientedRectangle2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,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,Parallelogram2afp<ST,IT,IE,P,V,B>,Serializable,Shape2afp<ST,IT,IE,P,V,B>,Shape2D<ST,IT,PathIterator2afp<IE>,P,V,B>
- All Known Subinterfaces:
Rectangle2afp<ST,IT,IE,P,V,B>
- All Known Implementing Classes:
OrientedRectangle2d,OrientedRectangle2dfx,Rectangle2d,Rectangle2dfx
public interface OrientedRectangle2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>> extends Parallelogram2afp<ST,IT,IE,P,V,B>
Fonctional interface that represented a 2D oriented rectangle on a plane. An oriented rectangle is a parallelogram with orthogonal axes.- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Nicolas GAUD
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classOrientedRectangle2afp.AbstractOrientedRectanglePathIterator<T extends PathElement2afp>Abstract iterator on the path elements of the oriented rectangle.static classOrientedRectangle2afp.OrientedRectanglePathIterator<T extends PathElement2afp>Iterator on the path elements of an oriented rectangle.static classOrientedRectangle2afp.ProjectionToOrientedRectangleLocalCoordinateSystemPathIterator<T extends PathElement2afp>An iterator that automatically transform and reply the path elements from the given iterator such that the coordinates of the path elements are projected in the local coordinate system of the given oriented box.static classOrientedRectangle2afp.TransformedOrientedRectanglePathIterator<T extends PathElement2afp>Iterator on the path elements of a transformed oriented rectangle.-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.afp.Parallelogram2afp
Parallelogram2afp.AbstractParallelogramPathIterator<T extends PathElement2afp>, Parallelogram2afp.ParallelogramPathIterator<T extends PathElement2afp>, Parallelogram2afp.ProjectionToParallelogramLocalCoordinateSystemPathIterator<T extends PathElement2afp>, Parallelogram2afp.TransformedParallelogramPathIterator<T extends PathElement2afp>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static voidcalculatesCenterPointAxisExtents(Iterable<? extends Point2D<?,?>> points, Vector2D<?,?> raxis, Point2D<?,?> center, Tuple2D<?> extents)Compute the center point and axis extents of an oriented rectangle from a set of points and the oriented rectangle axes.default voidclear()Reset this shape to be equivalent to an just-created instance of this shape type.default booleancontains(double x, double y)Replies if the given point is inside this shape.default booleancontains(Rectangle2afp<?,?,?,?,?,?> rectangle)Replies if the given rectangle is inside this shape.static booleancontainsOrientedRectanglePoint(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double px, double py)Replies if a point is inside in the oriented rectangle.static booleancontainsOrientedRectangleRectangle(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double rx, double ry, double rwidth, double rheight)Replies if a point is inside the oriented rectangle.default booleanequalsToShape(IT shape)Replies this shape is equal to the given shape.static voidfindsClosestFarthestPointsPointOrientedRectangle(double px, double py, double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, Point2D<?,?> closest, Point2D<?,?> farthest)} Given a point p, this function computes the point q1 on (or in) this oriented rectangle, closest to p; and the point q2 on the oriented rectangle, farthest to p.static doublefindsVectorProjectionRAxisVector(double rx, double ry, double x, double y)Project the given vector on the R axis, assuming S axis is orthogonal.static doublefindsVectorProjectionSAxisVector(double rx, double ry, double x, double y)Project the given vector on the S axis, assuming R axis is orthogonal.default PgetClosestPointTo(Circle2afp<?,?,?,?,?,?> circle)Replies the closest point on this shape to the given circle.default PgetClosestPointTo(Ellipse2afp<?,?,?,?,?,?> ellipse)Replies the closest point on this shape to the given ellipse.default PgetClosestPointTo(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)Replies the closest point on this shape to the given oriented rectangle.default PgetClosestPointTo(Parallelogram2afp<?,?,?,?,?,?> parallelogram)Replies the closest point on this shape to the given parallelogram.default PgetClosestPointTo(Path2afp<?,?,?,?,?,?> path)Replies the closest point on this shape to the given path.default PgetClosestPointTo(Rectangle2afp<?,?,?,?,?,?> rectangle)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)Replies the closest point on this shape to the given round rectangle.default PgetClosestPointTo(Segment2afp<?,?,?,?,?,?> segment)Replies the closest point on this shape to the given segment.default PgetClosestPointTo(Triangle2afp<?,?,?,?,?,?> triangle)Replies the closest point on this shape to the given triangle.default PgetClosestPointTo(Point2D<?,?> pt)Replies the point on the shape that is closest to the given point.default doublegetDistanceL1(Point2D<?,?> pt)Computes the L-1 (Manhattan) distance between this shape and point p1.default doublegetDistanceLinf(Point2D<?,?> pt)Computes the L-infinite distance between this shape and point p1.default doublegetDistanceSquared(Point2D<?,?> pt)Replies the squared value of the minimal distance from this shape to the given point.default PgetFarthestPointTo(Point2D<?,?> pt)Replies the point on the shape that is farthest the given point.default PathIterator2afp<IE>getPathIterator(Transform2D transform)Replies the elements of the paths.default booleanintersects(Circle2afp<?,?,?,?,?,?> circle)Replies if this shape is intersecting the given circle.default booleanintersects(Ellipse2afp<?,?,?,?,?,?> ellipse)Replies if this shape is intersecting the given ellipse.default booleanintersects(MultiShape2afp<?,?,?,?,?,?,?> multishape)Replies if this shape is intersecting the given multishape.default booleanintersects(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)Replies if this shape is intersecting the given rectangle.default booleanintersects(Parallelogram2afp<?,?,?,?,?,?> parallelogram)Replies if this shape is intersecting the given parallelogram.default booleanintersects(PathIterator2afp<?> iterator)Replies if this shape is intersecting the shape representing the given path iterator.default booleanintersects(Rectangle2afp<?,?,?,?,?,?> rectangle)Replies if this shape is intersecting the given rectangle.default booleanintersects(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)Replies if this shape is intersecting the given rectangle.default booleanintersects(Segment2afp<?,?,?,?,?,?> segment)Replies if this shape is intersecting the given line.default booleanintersects(Triangle2afp<?,?,?,?,?,?> triangle)Replies if this shape is intersecting the given triangle.static booleanintersectsOrientedRectangleCircle(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double circleX, double circleY, double circleRadius)Replies if the specified parallelogram intersects the specified circle.static booleanintersectsOrientedRectangleEllipse(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double ex, double ey, double ewidth, double eheight)Replies if the parallelogram intersects the given ellipse.static booleanintersectsOrientedRectangleOrientedRectangle(double centerX1, double centerY1, double axis1X1, double axis1Y1, double axis1Extent1, double axis2Extent1, double centerX2, double centerY2, double axis1X2, double axis1Y2, double axis1Extent2, double axis2Extent2)Replies if the specified rectangles intersect.static <T extends PathElement2afp>
booleanintersectsOrientedRectanglePathIterator(double centerX, double centerY, double axis1X, double axis1Y, double extent1, double extent2, PathIterator2afp<T> pathIterator)Tests if the interior of the specifiedPathIterator2afpintersects the interior of a specified set of oriented rectangular coordinates.static booleanintersectsOrientedRectangleRectangle(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double rx, double ry, double rwidth, double rheight)Replies if the specified rectangles intersect.static booleanintersectsOrientedRectangleRoundRectangle(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double rx, double ry, double rwidth, double rheight, double rArcWidth, double rArcHeight)Replies if the oriented rectangle intersects the given rectangle.static booleanintersectsOrientedRectangleSegment(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double s1x, double s1y, double s2x, double s2y)Replies if the specified rectangle intersects the specified segment.static booleanintersectsOrientedRectangleTriangle(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double s1x, double s1y, double s2x, double s2y, double s3x, double s3y)Replies if the specified rectangle intersects the specified triangle.default voidrotate(double angle)Roate the parallelogram around its center.voidset(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent)Set the oriented rectangle.default voidset(double centerX, double centerY, double axis1x, double axis1y, double axis1Extent, double axis2x, double axis2y, double axis2Extent)Set the oriented rectangle.default voidset(IT rectangle)Set this shape with the attributes of the given shape.default voidset(Point2D<?,?> center, Vector2D<?,?> axis1, double axis1Extent, double axis2Extent)Set the oriented rectangle.default voidsetFromPointCloud(Iterable<? extends Point2D<?,?>> pointCloud)Set the parallelogram from a could of points.default voidtoBoundingBox(B box)Replies the bounds of the shape.default voidtranslate(double dx, double dy)Translate the shape.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.Parallelogram2afp
getCenter, getCenterX, getCenterY, getFirstAxis, getFirstAxisExtent, getFirstAxisX, getFirstAxisY, getSecondAxis, getSecondAxisExtent, getSecondAxisX, getSecondAxisY, isCCW, isEmpty, set, setCenter, setCenter, setCenterX, setCenterY, setFirstAxis, setFirstAxis, setFirstAxis, setFirstAxis, setFirstAxisExtent, setFromPointCloud, setSecondAxis, setSecondAxis, setSecondAxis, setSecondAxis, setSecondAxisExtent
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.Shape2afp
contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, intersects, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Shape2D
clone, equalsToPathIterator, getDistance, getDistance, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
-
-
-
Method Detail
-
findsVectorProjectionRAxisVector
@Pure static double findsVectorProjectionRAxisVector(double rx, double ry, double x, double y)Project the given vector on the R axis, assuming S axis is orthogonal.This function assumes that axes are orthogonal. For a general projection on the R axis, see
Parallelogram2afp.findsVectorProjectionRAxisPoint(double, double, double, double, double, double).- Parameters:
rx- the x coordinate of the R axis.ry- the y coordinate of the R axis.x- the x coordinate of the vector.y- the y coordinate of the vector.- Returns:
- the coordinate of the projection of the vector on R
- See Also:
Parallelogram2afp.findsVectorProjectionRAxisPoint(double, double, double, double, double, double)
-
findsVectorProjectionSAxisVector
@Pure static double findsVectorProjectionSAxisVector(double rx, double ry, double x, double y)Project the given vector on the S axis, assuming R axis is orthogonal.This function assumes that axes are orthogonal. For a general projection on the S axis, see
Parallelogram2afp.findsVectorProjectionSAxisVector(double, double, double, double, double, double).- Parameters:
rx- the x coordinate of the R axis (NOT the S axis).ry- the y coordinate of the R axis (NOT the S axis).x- the x coordinate of the vector.y- the y coordinate of the vector.- Returns:
- the coordinate of the projection of the vector on S
- See Also:
Parallelogram2afp.findsVectorProjectionSAxisVector(double, double, double, double, double, double)
-
calculatesCenterPointAxisExtents
static void calculatesCenterPointAxisExtents(Iterable<? extends Point2D<?,?>> points, Vector2D<?,?> raxis, Point2D<?,?> center, Tuple2D<?> extents)
Compute the center point and axis extents of an oriented rectangle from a set of points and the oriented rectangle axes.This function assumes orthogonal axes, in opposite to
Parallelogram2afp.calculatesCenterPointAxisExtents(Iterable, Vector2D, Vector2D, Point2D, Tuple2D), which assumes not constraint on the axes.- Parameters:
points- is the list of the points enclosed by the oriented rectangle.raxis- is the R axis of the oriented rectangle.center- is the point which is set with the parallogram's center coordinates.extents- are the extents of the parallogram for the R and S axis.- See Also:
- "MGPCG pages 222-223 (oriented bounding box)",
Parallelogram2afp.calculatesCenterPointAxisExtents(Iterable, Vector2D, Vector2D, Point2D, Tuple2D)
-
containsOrientedRectanglePoint
@Pure static boolean containsOrientedRectanglePoint(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double px, double py)Replies if a point is inside in the oriented rectangle.- Parameters:
px- is the X coordinate of the point to test.py- is the Y coordinate of the point to test.centerX- is the X coordinate of the oriented rectangle center.centerY- is the Y coordinate of the oriented rectangle center.axis1X- is the X coordinate of the axis 1 unit vector.axis1Y- is the Y coordinate of the axis 1 unit vector.axis1Extent- is the extent of the axis 1 of the oriented rectangle.axis2Extent- is the extent of the axis 2 of the oriented rectangle.- Returns:
trueif the given point is inside the oriented rectangle; otherwisefalse.
-
containsOrientedRectangleRectangle
@Pure static boolean containsOrientedRectangleRectangle(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double rx, double ry, double rwidth, double rheight)Replies if a point is inside the oriented rectangle.- Parameters:
centerX- is the X coordinate of the oriented rectangle center.centerY- is the Y coordinate of the oriented rectangle center.axis1X- is the X coordinate of the axis 1 unit vector.axis1Y- is the Y coordinate of the axis 1 unit vector.axis1Extent- is the extent of the axis 1 of the oriented rectangle.axis2Extent- is the extent of the axis 2 of the oriented rectangle.rx- is the X coordinate of the lower point of the rectangle.ry- is the Y coordinate of the lower point of the rectangle.rwidth- is the width of the rectangle.rheight- is the height of the rectangle.- Returns:
trueif the given rectangle is inside the oriented rectangle; otherwisefalse.
-
findsClosestFarthestPointsPointOrientedRectangle
static void findsClosestFarthestPointsPointOrientedRectangle(double px, double py, double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, Point2D<?,?> closest, Point2D<?,?> farthest)} Given a point p, this function computes the point q1 on (or in) this oriented rectangle, closest to p; and the point q2 on the oriented rectangle, farthest to p. If there are several points, the function will return one of those. Remember this function may return an approximate result when points remain on oriented rectangle plane of symmetry.- Parameters:
px- is the X coordinate of the point to test.py- is the Y coordinate of the point to test.centerX- is the X coordinate of the oriented rectangle center.centerY- is the Y coordinate of the oriented rectangle center.axis1X- is the X coordinate of the axis 1 vector.axis1Y- is the Y coordinate of the axis 1 vector.axis1Extent- is the extent of the axis 1 of the oriented rectangle.axis2Extent- is the extent of the axis 2 of the oriented rectangle.closest- the closest point. Ifnull, the closest point is not computed.farthest- the farthest point. Ifnull, the farthest point is not computed.
-
intersectsOrientedRectangleSegment
@Pure static boolean intersectsOrientedRectangleSegment(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double s1x, double s1y, double s2x, double s2y)Replies if the specified rectangle intersects the specified segment.- Parameters:
centerX- is the X coordinate of the oriented rectangle center.centerY- is the Y coordinate of the oriented rectangle center.axis1X- is the X coordinate of the axis 1 unit vector.axis1Y- is the Y coordinate of the axis 1 unit vector.axis1Extent- is the extent of the axis 1 of the oriented rectangle.axis2Extent- is the extent of the axis 2 of the oriented rectangle.s1x- is the X coordinate of the first point of the segment.s1y- is the Y coordinate of the first point of the segment.s2x- is the X coordinate of the second point of the segment.s2y- is the Y coordinate of the second point of the segment.- Returns:
trueif intersecting, otherwisefalse
-
intersectsOrientedRectangleTriangle
@Pure static boolean intersectsOrientedRectangleTriangle(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double s1x, double s1y, double s2x, double s2y, double s3x, double s3y)Replies if the specified rectangle intersects the specified triangle.- Parameters:
centerX- is the X coordinate of the oriented rectangle center.centerY- is the Y coordinate of the oriented rectangle center.axis1X- is the X coordinate of the axis 1 unit vector.axis1Y- is the Y coordinate of the axis 1 unit vector.axis1Extent- is the extent of the axis 1 of the oriented rectangle.axis2Extent- is the extent of the axis 2 of the oriented rectangle.s1x- is the X coordinate of the first point of the triangle.s1y- is the Y coordinate of the first point of the triangle.s2x- is the X coordinate of the second point of the triangle.s2y- is the Y coordinate of the second point of the triangle.s3x- is the X coordinate of the third point of the triangle.s3y- is the Y coordinate of the third point of the triangle.- Returns:
trueif intersecting, otherwisefalse
-
intersectsOrientedRectangleEllipse
@Pure static boolean intersectsOrientedRectangleEllipse(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double ex, double ey, double ewidth, double eheight)Replies if the parallelogram intersects the given ellipse.- Parameters:
centerX- is the X coordinate of the parallelogram center.centerY- is the Y coordinate of the parallelogram center.axis1X- is the X coordinate of the axis 1 unit vector.axis1Y- is the Y coordinate of the axis 1 unit vector.axis1Extent- is the extent of the axis 1 of the parallelogram.axis2Extent- is the extent of the axis 2 of the parallelogram.ex- is the coordinate of the min point of the ellipse rectangle.ey- is the coordinate of the min point of the ellipse rectangle.ewidth- is the width of the ellipse.eheight- is the height of the ellipse.- Returns:
trueif intersecting, otherwisefalse
-
intersectsOrientedRectangleCircle
@Pure static boolean intersectsOrientedRectangleCircle(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double circleX, double circleY, double circleRadius)Replies if the specified parallelogram intersects the specified circle.- Parameters:
centerX- is the X coordinate of the parallelogram center.centerY- is the Y coordinate of the parallelogram center.axis1X- is the X coordinate of the axis 1 unit vector.axis1Y- is the Y coordinate of the axis 1 unit vector.axis1Extent- is the extent of the axis 1 of the parallelogram.axis2Extent- is the extent of the axis 2 of the parallelogram.circleX- is the coordinate of the circle center.circleY- is the coordinate of the circle center.circleRadius- is the radius of the circle.- Returns:
trueif intersecting, otherwisefalse
-
intersectsOrientedRectangleOrientedRectangle
@Pure static boolean intersectsOrientedRectangleOrientedRectangle(double centerX1, double centerY1, double axis1X1, double axis1Y1, double axis1Extent1, double axis2Extent1, double centerX2, double centerY2, double axis1X2, double axis1Y2, double axis1Extent2, double axis2Extent2)Replies if the specified rectangles intersect.The extents are assumed to be positive or zero. The lengths of the given arrays are assumed to be
2.This function uses the "separating axis theorem" which states that for any two oriented rectangles (AABB is a special case of oriented rectangle) that do not touch, a separating axis can be found.
This function uses an general intersection test between two oriented rectangle. If the first box is expected to be an MBR, please use the optimized algorithm given by
intersectsOrientedRectangleRectangle(double, double, double, double, double, double, double, double, double, double).- Parameters:
centerX1- is the X coordinate of the oriented rectangle center.centerY1- is the Y coordinate of the oriented rectangle center.axis1X1- is the X coordinate of the axis 1 unit vector.axis1Y1- is the Y coordinate of the axis 1 unit vector.axis1Extent1- is the extent of the axis 1 of the oriented rectangle.axis2Extent1- is the extent of the axis 2 of the oriented rectangle.centerX2- is the X coordinate of the oriented rectangle center.centerY2- is the Y coordinate of the oriented rectangle center.axis1X2- is the X coordinate of the axis 1 unit vector.axis1Y2- is the Y coordinate of the axis 1 unit vector.axis1Extent2- is the extent of the axis 1 of the oriented rectangle.axis2Extent2- is the extent of the axis 2 of the oriented rectangle.- Returns:
trueif intersecting, otherwisefalse- See Also:
- "RTCD pages 102-105", Intersection between two oriented boudning rectangles
-
intersectsOrientedRectangleRectangle
@Pure static boolean intersectsOrientedRectangleRectangle(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double rx, double ry, double rwidth, double rheight)Replies if the specified rectangles intersect.This function is assuming that
lx1is lower or equal toux1, andly1is lower or equal touy1. The extents are assumed to be positive or zero. The lengths of the given arrays are assumed to be2.This function uses the "separating axis theorem" which states that for any two oriented rectangles (AABB is a special case of oriented rectangle) that do not touch, a separating axis can be found.
This function uses an optimized algorithm for AABB as first parameter. The general intersection type between two oriented rectangle is given by
intersectsOrientedRectangleOrientedRectangle(double, double, double, double, double, double, double, double, double, double, double, double).- Parameters:
centerX- is the X coordinate of the oriented rectangle center.centerY- is the Y coordinate of the oriented rectangle center.axis1X- is the X coordinate of the axis 1 unit vector.axis1Y- is the Y coordinate of the axis 1 unit vector.axis1Extent- is the extent of the axis 1 of the oriented rectangle.axis2Extent- is the extent of the axis 2 of the oriented rectangle.rx- is the X coordinate of the lower point of the rectangle.ry- is the Y coordinate of the lower point of the rectangle.rwidth- is the width of the rectangle.rheight- is the height of the rectangle.- Returns:
trueif intersecting, otherwisefalse- See Also:
- "RTCD pages 102-105", OBB collision detection on Gamasutra.com
-
intersectsOrientedRectangleRoundRectangle
@Pure static boolean intersectsOrientedRectangleRoundRectangle(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent, double rx, double ry, double rwidth, double rheight, double rArcWidth, double rArcHeight)Replies if the oriented rectangle intersects the given rectangle.- Parameters:
centerX- is the X coordinate of the parallelogram center.centerY- is the Y coordinate of the parallelogram center.axis1X- is the X coordinate of the axis 1 unit vector.axis1Y- is the Y coordinate of the axis 1 unit vector.axis1Extent- is the extent of the axis 1 of the parallelogram.axis2Extent- is the extent of the axis 2 of the parallelogram.rx- is the X coordinate of the lower point of the rectangle.ry- is the Y coordinate of the lower point of the rectangle.rwidth- is the width of the rectangle.rheight- is the height of the rectangle.rArcWidth- is the width of the rectangle arcs.rArcHeight- is the height of the rectangle arcs.- Returns:
trueif intersecting, otherwisefalse.
-
intersectsOrientedRectanglePathIterator
static <T extends PathElement2afp> boolean intersectsOrientedRectanglePathIterator(double centerX, double centerY, double axis1X, double axis1Y, double extent1, double extent2, PathIterator2afp<T> pathIterator)
Tests if the interior of the specifiedPathIterator2afpintersects the interior of a specified set of oriented rectangular coordinates.- Type Parameters:
T- the type of the path elements to iterate on.- Parameters:
centerX- the specified X coordinate of the rectangle center.centerY- the specified Y coordinate of the rectangle center.axis1X- the X coordinate of the first axis of the rectangle.axis1Y- the Y coordinate of the first axis of the rectangle.extent1- the extent the rectangle along the first axis.extent2- the extent the rectangle along the second axis.pathIterator- the specifiedPathIterator2afp.- Returns:
trueif the specifiedPathIterator2afpand the interior of the specified set of rectangular coordinates intersect each other;falseotherwise.
-
equalsToShape
@Pure default boolean equalsToShape(IT shape)
Description copied from interface:Shape2DReplies this shape is equal to the given shape.- Specified by:
equalsToShapein interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
equalsToShapein interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
shape- the shape to compare to.- Returns:
trueif this shape is equal is equal to the given path.
-
clear
default void clear()
Description copied from interface:Shape2DReset this shape to be equivalent to an just-created instance of this shape type.- Specified by:
clearin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
clearin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>
-
set
default void set(IT rectangle)
Description copied from interface:Shape2DSet this shape with the attributes of the given shape.- Specified by:
setin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
setin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
rectangle- the shape to copy.
-
set
default void set(double centerX, double centerY, double axis1x, double axis1y, double axis1Extent, double axis2x, double axis2y, double axis2Extent)Set the oriented rectangle.For an oriented rectangle, the coordinates of the second axis are ignored. Indeed, they are automatically computed for being orthogonal to the first axis.
- Specified by:
setin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
centerX- is the X coordinate of the OBR center.centerY- is the Y coordinate of the OBR center.axis1x- is the X coordinate of first axis of the OBR.axis1y- is the Y coordinate of first axis of the OBR.axis1Extent- is the extent of the first axis.axis2x- is the X coordinate of second axis of the OBR.axis2y- is the Y coordinate of second axis of the OBR.axis2Extent- is the extent of the second axis.
-
set
default void set(Point2D<?,?> center, Vector2D<?,?> axis1, double axis1Extent, double axis2Extent)
Set the oriented rectangle. The second axis is automatically computed.- Parameters:
center- is the oriented rectangle center.axis1- is the first axis of the oriented rectangle.axis1Extent- is the extent of the first axis.axis2Extent- is the extent of the second axis.
-
set
void set(double centerX, double centerY, double axis1X, double axis1Y, double axis1Extent, double axis2Extent)Set the oriented rectangle. The second axis is automatically computed.- Parameters:
centerX- is the X coordinate of the oriented rectangle center.centerY- is the Y coordinate of the oriented rectangle center.axis1X- is the X coordinate of first axis of the oriented rectangle.axis1Y- is the Y coordinate of first axis of the oriented rectangle.axis1Extent- is the extent of the first axis.axis2Extent- is the extent of the second axis.
-
setFromPointCloud
default void setFromPointCloud(Iterable<? extends Point2D<?,?>> pointCloud)
Description copied from interface:Parallelogram2afpSet the parallelogram from a could of points.This function changes the axes to be orthogonal.
- Specified by:
setFromPointCloudin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
pointCloud- - the cloud of points.
-
getDistanceSquared
@Pure default double getDistanceSquared(Point2D<?,?> pt)
Description copied from interface:Shape2DReplies the squared value of the minimal distance from this shape to the given point.- Specified by:
getDistanceSquaredin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getDistanceSquaredin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,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(Point2D<?,?> pt)
Description copied from interface:Shape2DComputes 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 interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getDistanceL1in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
pt- the point- Returns:
- the distance.
-
getDistanceLinf
@Pure default double getDistanceLinf(Point2D<?,?> pt)
Description copied from interface:Shape2DComputes the L-infinite distance between this shape and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].- Specified by:
getDistanceLinfin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getDistanceLinfin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
pt- the point- Returns:
- the distance.
-
translate
default void translate(double dx, double dy)Description copied from interface:Shape2afpTranslate the shape.- Specified by:
translatein interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
translatein interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
dx- x translation.dy- y translation.
-
contains
@Pure default boolean contains(double x, double y)Description copied from interface:Shape2afpReplies if the given point is inside this shape.- Specified by:
containsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
containsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
x- x coordinate of the point to test.y- y coordinate of the point to test.- Returns:
trueif the given point is inside this shape, otherwisefalse.
-
contains
@Pure default boolean contains(Rectangle2afp<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2afpReplies if the given rectangle is inside this shape.- Specified by:
containsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
containsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
rectangle- the rectangle.- Returns:
trueif the given rectangle is inside this shape, otherwisefalse.
-
intersects
@Pure default boolean intersects(Circle2afp<?,?,?,?,?,?> circle)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given circle.- Specified by:
intersectsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
circle- the circle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Ellipse2afp<?,?,?,?,?,?> ellipse)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given ellipse.- Specified by:
intersectsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
ellipse- the ellipse.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given rectangle.- Specified by:
intersectsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
orientedRectangle- the oriented rectangle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Parallelogram2afp<?,?,?,?,?,?> parallelogram)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given parallelogram.- Specified by:
intersectsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
parallelogram- the parallelogram.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Rectangle2afp<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given rectangle.- Specified by:
intersectsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
rectangle- the rectangle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given rectangle.- Specified by:
intersectsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
roundRectangle- the round rectangle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Segment2afp<?,?,?,?,?,?> segment)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given line.- Specified by:
intersectsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,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(Triangle2afp<?,?,?,?,?,?> triangle)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given triangle.- Specified by:
intersectsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
triangle- the triangle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(PathIterator2afp<?> iterator)
Description copied from interface:Shape2afpReplies if this shape is intersecting the shape representing the given path iterator.- Specified by:
intersectsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,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(MultiShape2afp<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given multishape.- Specified by:
intersectsin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
multishape- the multishape.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
getPathIterator
@Pure default PathIterator2afp<IE> getPathIterator(Transform2D transform)
Description copied from interface:Shape2DReplies the elements of the paths.- Specified by:
getPathIteratorin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getPathIteratorin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
transform- is the transformation to apply to the path.- Returns:
- the elements of the path.
-
toBoundingBox
@Pure default void toBoundingBox(B box)
Description copied from interface:Shape2DReplies the bounds of the shape.- Specified by:
toBoundingBoxin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
toBoundingBoxin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
box- is set with the bounds of the shape.
-
getClosestPointTo
@Pure default P getClosestPointTo(Point2D<?,?> pt)
Description copied from interface:Shape2DReplies the point on the shape that is closest to the given point.- Specified by:
getClosestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getClosestPointToin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,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(Circle2afp<?,?,?,?,?,?> circle)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given circle.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
circle- the circle.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Ellipse2afp<?,?,?,?,?,?> ellipse)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given ellipse.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
ellipse- the ellipse.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Rectangle2afp<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given rectangle.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
rectangle- the rectangle.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Segment2afp<?,?,?,?,?,?> segment)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given segment.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
segment- the segment.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Triangle2afp<?,?,?,?,?,?> triangle)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given triangle.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
triangle- the triangle.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given oriented rectangle.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
orientedRectangle- the oriented rectangle.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Parallelogram2afp<?,?,?,?,?,?> parallelogram)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given parallelogram.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
parallelogram- the parallelogram.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given round rectangle.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
roundRectangle- the round rectangle.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Path2afp<?,?,?,?,?,?> path)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given path.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
path- the path.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getFarthestPointTo
@Pure default P getFarthestPointTo(Point2D<?,?> pt)
Description copied from interface:Shape2DReplies the point on the shape that is farthest the given point.- Specified by:
getFarthestPointToin interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Specified by:
getFarthestPointToin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
pt- the point.- Returns:
- the farthest point on the shape.
-
rotate
default void rotate(double angle)
Description copied from interface:Parallelogram2afpRoate the parallelogram around its center.- Specified by:
rotatein interfaceParallelogram2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends OrientedRectangle2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
angle- the angle of rotation.
-
-