public final class Parallelogram extends ConvexArea
Modifier and Type | Class and Description |
---|---|
static class |
Parallelogram.Builder
Class designed to aid construction of
Parallelogram instances. |
AbstractConvexHyperplaneBoundedRegion.ConvexRegionBoundaryBuilder<P extends Point<P>,S extends HyperplaneConvexSubset<P>>
Modifier and Type | Method and Description |
---|---|
static Parallelogram |
axisAligned(Vector2D a,
Vector2D b,
DoublePrecisionContext precision)
Return a new instance representing an axis-aligned rectangle.
|
static Parallelogram.Builder |
builder(DoublePrecisionContext precision)
Return a new
Parallelogram.Builder instance to use for constructing parallelograms. |
static Parallelogram |
fromTransformedUnitSquare(Transform<Vector2D> transform,
DoublePrecisionContext precision)
Create a new instance by transforming a unit square centered at the origin.
|
static Parallelogram |
unitSquare(DoublePrecisionContext precision)
Return a new instance representing a unit square centered on the origin.
|
boundaryStream, convexPolygonFromPath, convexPolygonFromVertices, fromBounds, fromBounds, full, getBoundaryPaths, getCentroid, getSize, getVertices, split, toTree, transform, trim
classify, getBoundaries, getBoundarySize, isEmpty, isFull, project, splitInternal, swapsInsideOutside, toString, transformInternal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
from, from, getBounds, linecast, linecastFirst
linecast, linecastFirst
isFinite, isInfinite
public static Parallelogram unitSquare(DoublePrecisionContext precision)
[ (-0.5 -0.5), (0.5, -0.5), (0.5, 0.5), (-0.5, 0.5) ]
precision
- precision context used to construct boundariespublic static Parallelogram axisAligned(Vector2D a, Vector2D b, DoublePrecisionContext precision)
a
and b
are taken to represent opposite corner points in the rectangle and may be specified in
any order.a
- first corner point in the rectangle (opposite of b
)b
- second corner point in the rectangle (opposite of a
)precision
- precision context used to construct boundariesIllegalArgumentException
- if the length of any side of the parallelogram is zero,
as determined by the given precision contextpublic static Parallelogram fromTransformedUnitSquare(Transform<Vector2D> transform, DoublePrecisionContext precision)
[ (-0.5 -0.5), (0.5, -0.5), (0.5, 0.5), (-0.5, 0.5) ]
transform
- the transform to apply to the unit squareprecision
- precision context used to construct boundariesIllegalArgumentException
- if the length of any side of the parallelogram is zero,
as determined by the given precision contextpublic static Parallelogram.Builder builder(DoublePrecisionContext precision)
Parallelogram.Builder
instance to use for constructing parallelograms.precision
- precision context used to create boundariesParallelogram.Builder
instanceCopyright © 2016–2020 The Apache Software Foundation. All rights reserved.