public interface Rectangle2d extends Polygon2d
Modifier and Type | Method and Description |
---|---|
static Rectangle2d |
create(List<? extends Vector2d> vertices)
Creates a new instance from the given points.
|
static Rectangle2d |
create(Rectangle2d other)
Creates a new instance.
|
boolean |
equalsWithTolerance(Rectangle2d rectangle,
double epsilon)
Verifies if two 2D rectangles are equal (with epsilon
difference).
|
Segment2d |
getLongerRectangleSegment()
Returns the longer segment of the rectangle.
|
double |
getLongerRectangleSegmentLength()
Returns the length of the longer rectangle segment.
|
List<Segment2d> |
getLongerRectangleSegments()
Returns the longer segments of the rectangle.
|
Segment2d |
getShorterRectangleSegment()
Returns the shorter segment of the rectangle.
|
double |
getShorterRectangleSegmentLength()
Returns the length of shorter rectangle segment.
|
List<Segment2d> |
getShorterRectangleSegments()
Returns the shorter segments of the rectangle.
|
contains, contains, create, distance, distance, distance, distanceSquared, distanceSquared, distanceSquared, getArea, getBoundingRectangle, getCentroid, getEdgeIterator, getOrientedBoundingRectangle, getPerimeter, getVertexCount, getVertices, intersectEdges, intersects, isConvex, isCounterClockwise, shortestSegmentTo, toArea
forEach, iterator, spliterator
Segment2d getLongerRectangleSegment()
List<Segment2d> getLongerRectangleSegments()
double getLongerRectangleSegmentLength()
Segment2d getShorterRectangleSegment()
List<Segment2d> getShorterRectangleSegments()
double getShorterRectangleSegmentLength()
boolean equalsWithTolerance(Rectangle2d rectangle, double epsilon)
rectangle
- the rectangle to compare toepsilon
- the tolerance radiusstatic Rectangle2d create(List<? extends Vector2d> vertices)
create
in interface Polygon2d
vertices
- list of points to create the rectangleIllegalArgumentException
- if the points do not form a rectanglestatic Rectangle2d create(Rectangle2d other)
other
- the other rectangleCopyright © 2019 Solibri, Inc.. All rights reserved.