public interface FrameConvexPolygon2DBasics extends FixedFrameConvexPolygon2DBasics, FrameChangeable
This implementation of convex polygon is designed for garbage free operations.
EMPTY_SUPPLIER
Modifier and Type | Method and Description |
---|---|
void |
changeFrameAndProjectToXYPlane(ReferenceFrame desiredFrame)
Performs a transformation of the polygon such that it is expressed in a new frame
desireFrame . |
default void |
clear(ReferenceFrame referenceFrame)
Clear this polygon and sets it reference frame.
|
default void |
clearAndUpdate(ReferenceFrame referenceFrame)
Clear this polygon, sets it reference frame.
|
default void |
setIncludingFrame(FrameVertex2DSupplier frameVertex2DSupplier)
This method does:
setReferenceFrame(ReferenceFrame) using the reference frame of the first vertex. |
default void |
setIncludingFrame(FrameVertex2DSupplier firstVertex2DSupplier,
FrameVertex2DSupplier secondVertex2DSupplier)
This method does:
setReferenceFrame(ReferenceFrame) using the reference frame of
firstPolygon . |
default void |
setIncludingFrame(FrameVertex3DSupplier frameVertex3DSupplier)
This method does:
setReferenceFrame(ReferenceFrame) using the reference frame of the first vertex. |
default void |
setIncludingFrame(ReferenceFrame referenceFrame,
Vertex2DSupplier vertex2DSupplier)
This method does:
setReferenceFrame(ReferenceFrame)
ConvexPolygon2DBasics.set(Vertex2DSupplier) . |
default void |
setIncludingFrame(ReferenceFrame referenceFrame,
Vertex2DSupplier firstVertexSupplier,
Vertex2DSupplier secondVertexSupplier)
|
default void |
setIncludingFrame(ReferenceFrame referenceFrame,
Vertex3DSupplier vertex3DSupplier)
This method does:
setReferenceFrame(ReferenceFrame)
ConvexPolygon2DBasics.set(Vertex3DSupplier) . |
void |
setReferenceFrame(ReferenceFrame referenceFrame)
Sets the reference frame of this polygon without updating or modifying the coordinates of its
vertices.
|
default void |
setToNaN(ReferenceFrame referenceFrame)
Clears this polygon, adds a single vertex at (
Double.NaN , Double.NaN ), and
updates it. |
default void |
setToZero(ReferenceFrame referenceFrame)
Clears this polygon, adds a single vertex at (0, 0), and updates it.
|
addVertex, addVertex, addVertex, addVertex, addVertex, addVertexMatchingFrame, addVertexMatchingFrame, addVertexMatchingFrame, addVertexMatchingFrame, addVertices, addVertices, addVerticesMatchingFrame, addVerticesMatchingFrame, getVertexUnsafe, scale, set, set, set, set, set, setMatchingFrame, setMatchingFrame, translate
canObserverSeeEdge, distance, epsilonEquals, equals, geometricallyEquals, getCentroid, getClosestEdge, getClosestEdge, getClosestEdge, getClosestEdge, getClosestEdge, getClosestEdgeCopy, getClosestEdgeCopy, getClosestEdgeIndex, getClosestPointWithRay, getClosestPointWithRay, getClosestPointWithRay, getClosestPointWithRay, getClosestPointWithRay, getClosestPointWithRay, getClosestPointWithRay, getClosestVertex, getClosestVertex, getClosestVertex, getClosestVertex, getClosestVertex, getClosestVertex, getClosestVertex, getClosestVertex, getClosestVertex, getClosestVertex, getClosestVertexCopy, getClosestVertexCopy, getClosestVertexCopy, getClosestVertexCopy, getClosestVertexIndex, getClosestVertexIndex, getEdge, getEdge, getFramePointsInClockwiseOrder, getNextVertex, getNextVertexCCW, getPolygonVerticesView, getPreviousVertex, getPreviousVertexCCW, getVertex, getVertexBufferView, getVertexCCW, getVerticesInClockwiseOrder, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWith, intersectionWithRay, intersectionWithRay, intersectionWithRay, intersectionWithRay, intersectionWithRay, intersectionWithRay, intersectionWithRay, intersectionWithRay, intersectionWithRay, intersectionWithRay, intersectionWithRay, isPointInside, isPointInside, lineOfSightEndIndex, lineOfSightEndVertex, lineOfSightEndVertex, lineOfSightEndVertex, lineOfSightEndVertex, lineOfSightEndVertex, lineOfSightEndVertexCopy, lineOfSightEndVertexCopy, lineOfSightIndices, lineOfSightStartIndex, lineOfSightStartVertex, lineOfSightStartVertex, lineOfSightStartVertex, lineOfSightStartVertex, lineOfSightStartVertex, lineOfSightStartVertexCopy, lineOfSightStartVertexCopy, lineOfSightVertices, lineOfSightVertices, orthogonalProjection, orthogonalProjection, orthogonalProjection, orthogonalProjection, orthogonalProjection, orthogonalProjection, orthogonalProjection, orthogonalProjectionCopy, orthogonalProjectionCopy, pointIsOnPerimeter, signedDistance, translateCopy, translateCopy
checkReferenceFrameMatch, checkReferenceFrameMatch, getReferenceFrame
asFrameVertex2DSupplier, asFrameVertex2DSupplier, asFrameVertex2DSupplier, asFrameVertex2DSupplier, asFrameVertex2DSupplier, asFrameVertex2DSupplier, emptyFrameVertex2DSupplier, epsilonEquals, equals
addVertex, addVertex, addVertex, addVertices, addVertices, applyInverseTransform, applyInverseTransform, applyTransform, applyTransform, clear, clearAndUpdate, containsNaN, getBoundingBox, notifyVerticesChanged, removeVertex, scale, scale, set, set, set, setToNaN, setToZero, translate, translate, update, updateBoundingBox, updateCentroidAndArea
canObserverSeeEdge, checkIfUpToDate, checkIndexInBoundaries, checkNonEmpty, distance, epsilonEquals, equals, geometricallyEquals, getArea, getBoundingBoxRangeX, getBoundingBoxRangeY, getClosestEdge, getClosestEdgeIndex, getClosestPointWithRay, getClosestVertex, getClosestVertex, getClosestVertexIndex, getClosestVertexIndex, getEdge, getMaxX, getMaxY, getMinX, getMinY, getNextVertexIndex, getNumberOfVertices, getPointsInClockwiseOrder, getPreviousVertexIndex, getVerticesInClockwiseOrder, intersectionWith, intersectionWith, intersectionWithRay, isClockwiseOrdered, isEmpty, isPointInside, isPointInside, isPointInside, isPointInside, isUpToDate, lineOfSightEndIndex, lineOfSightEndVertex, lineOfSightIndices, lineOfSightStartIndex, lineOfSightStartVertex, orthogonalProjection, orthogonalProjection, pointIsOnPerimeter, signedDistance
asVertex2DSupplier, asVertex2DSupplier, asVertex2DSupplier, asVertex2DSupplier, asVertex2DSupplier, asVertex2DSupplier, asVertex2DSupplier, asVertex2DSupplier, asVertex2DSupplier, emptyVertex2DSupplier, epsilonEquals, equals
changeFrame
default void clear(ReferenceFrame referenceFrame)
After calling this method, the polygon has no vertex, area, or centroid.
referenceFrame
- the new reference frame for this frame convex polygon.ConvexPolygon2DBasics.clear()
default void clearAndUpdate(ReferenceFrame referenceFrame)
After calling this method, the polygon has no vertex, area, or centroid. Use only when an empty polygon is desired.
referenceFrame
- the new reference frame for this frame convex polygon.ConvexPolygon2DBasics.clearAndUpdate()
void setReferenceFrame(ReferenceFrame referenceFrame)
setReferenceFrame
in interface FrameChangeable
referenceFrame
- the new reference frame for this frame convex polygon.default void setToZero(ReferenceFrame referenceFrame)
referenceFrame
- the new reference frame for this frame convex polygon.ConvexPolygon2DBasics.setToZero()
default void setToNaN(ReferenceFrame referenceFrame)
Double.NaN
, Double.NaN
), and
updates it.referenceFrame
- the new reference frame for this frame convex polygon.ConvexPolygon2DBasics.setToNaN()
default void setIncludingFrame(ReferenceFrame referenceFrame, Vertex2DSupplier vertex2DSupplier)
referenceFrame
- the new reference frame for this frame convex polygon.vertex2DSupplier
- the supplier of vertices.Vertex2DSupplier
,
ConvexPolygon2DBasics.set(Vertex2DSupplier)
default void setIncludingFrame(ReferenceFrame referenceFrame, Vertex3DSupplier vertex3DSupplier)
referenceFrame
- the new reference frame for this frame convex polygon.vertex3DSupplier
- the supplier of vertices.Vertex3DSupplier
,
ConvexPolygon2DBasics.set(Vertex3DSupplier)
default void setIncludingFrame(ReferenceFrame referenceFrame, Vertex2DSupplier firstVertexSupplier, Vertex2DSupplier secondVertexSupplier)
referenceFrame
- the new reference frame for this frame convex polygon.firstVertexSupplier
- the first supplier of vertices.secondVertexSupplier
- the second supplier of vertices.Vertex2DSupplier
,
ConvexPolygon2DBasics.set(Vertex2DSupplier, Vertex2DSupplier)
default void setIncludingFrame(FrameVertex2DSupplier frameVertex2DSupplier)
setReferenceFrame(ReferenceFrame)
using the reference frame of the first vertex.
FixedFrameConvexPolygon2DBasics.set(FrameVertex2DSupplier)
.
If the supplier has no vertex, this polygon is cleared and the reference frame is not updated.
frameVertex2DSupplier
- the supplier of vertices.ReferenceFrameMismatchException
- if the reference frame of the supplied vertices are
inconsistent.FrameVertex2DSupplier
,
FixedFrameConvexPolygon2DBasics.set(FrameVertex2DSupplier)
default void setIncludingFrame(FrameVertex3DSupplier frameVertex3DSupplier)
setReferenceFrame(ReferenceFrame)
using the reference frame of the first vertex.
FixedFrameConvexPolygon2DBasics.set(FrameVertex3DSupplier)
.
If the supplier has no vertex, this polygon is cleared and the reference frame is not updated.
frameVertex3DSupplier
- the supplier of vertices.ReferenceFrameMismatchException
- if the reference frame of the supplied vertices are
inconsistent.FrameVertex3DSupplier
,
FixedFrameConvexPolygon2DBasics.set(FrameVertex3DSupplier)
default void setIncludingFrame(FrameVertex2DSupplier firstVertex2DSupplier, FrameVertex2DSupplier secondVertex2DSupplier)
setReferenceFrame(ReferenceFrame)
using the reference frame of
firstPolygon
.
FixedFrameConvexPolygon2DBasics.set(FrameVertex2DSupplier, FrameVertex2DSupplier)
.
firstVertex2DSupplier
- the first supplier of vertices.secondVertex2DSupplier
- the second supplier of vertices.ReferenceFrameMismatchException
- if the reference frame of the supplied vertices are
inconsistent.FixedFrameConvexPolygon2DBasics.set(FrameVertex2DSupplier, FrameVertex2DSupplier)
void changeFrameAndProjectToXYPlane(ReferenceFrame desiredFrame)
desireFrame
.
Because the transformation between two reference frames is a 3D transformation, the result of transforming this polygon's vertices 2D can result in vertices 3D. This method projects the result of the transformation onto the XY-plane.
desiredFrame
- the reference frame in which the polygon is to be expressed.