public interface MRectangle2d extends Rectangle2d, MPolygon2d
Modifier and Type | Method and Description |
---|---|
static MRectangle2d |
create(List<? extends Vector2d> vertices)
Creates a new instance from the given points.
|
static MRectangle2d |
create(Rectangle2d other)
Creates a new instance.
|
void |
resize(double resize)
Resizes the rectangle by the given amount by adding the resize amount
as tolerance to each side of the rectangle.
|
boolean |
setPoints(List<? extends Vector2d> points)
Sets the given points to the rectangle.
|
equalsWithTolerance, getLongerRectangleSegment, getLongerRectangleSegmentLength, getLongerRectangleSegments, getShorterRectangleSegment, getShorterRectangleSegmentLength, getShorterRectangleSegments
create, simplify, translate
contains, contains, distance, distance, distance, distanceSquared, distanceSquared, distanceSquared, getArea, getBoundingRectangle, getCentroid, getEdgeIterator, getOrientedBoundingRectangle, getPerimeter, getVertexCount, getVertices, intersectEdges, intersects, isConvex, isCounterClockwise, shortestSegmentTo, toArea
forEach, iterator, spliterator
void resize(double resize)
resize
in interface MPolygon2d
resize
- the resize amountboolean setPoints(List<? extends Vector2d> points)
points
- list of pointsstatic MRectangle2d create(List<? extends Vector2d> vertices)
create
in interface MPolygon2d
create
in interface Polygon2d
create
in interface Rectangle2d
vertices
- list of points to create the rectangleIllegalArgumentException
- if the points do not form a rectanglestatic MRectangle2d create(Rectangle2d other)
create
in interface Rectangle2d
other
- the other rectangleCopyright © 2020 Solibri, Inc.. All rights reserved.