/** * Sets this line segment to be same as the given line segment. * * @param other the other line segment to copy. Not modified. */ @Override public void set(LineSegment2D other) { LineSegment2DBasics.super.set(other); }
/** * Sets this line segment to be same as the given line segment. * * @param other the other line segment to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code other} are not expressed in * the same reference frame. */ default void set(FrameLineSegment2DReadOnly other) { checkReferenceFrameMatch(other); LineSegment2DBasics.super.set(other); }
/** * Redefines this line segment with new endpoints. * * @param firstEndpoint new endpoint of this line segment. Not modified * @param secondEndpoint new second endpoint of this line segment. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code secondEndpoint} are not * expressed in the same reference frame. */ default void set(Point2DReadOnly firstEndpoint, FramePoint2DReadOnly secondEndpoint) { checkReferenceFrameMatch(secondEndpoint); LineSegment2DBasics.super.set(firstEndpoint, secondEndpoint); }
/** * Sets this line segment to be same as the given line segment projected on the XY-plane. * * @param other the other line segment to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code other} are not expressed in * the same reference frame. */ default void set(FrameLineSegment3DReadOnly other) { checkReferenceFrameMatch(other); LineSegment2DBasics.super.set(other); }
/** * Redefines this line segment with new endpoints. * * @param firstEndpoint new endpoint of this line segment. Not modified * @param secondEndpoint new second endpoint of this line segment. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code secondEndpoint} are not * expressed in the same reference frame. */ default void set(Point3DReadOnly firstEndpoint, FramePoint3DReadOnly secondEndpoint) { checkReferenceFrameMatch(secondEndpoint); LineSegment2DBasics.super.set(firstEndpoint, secondEndpoint); }
/** * Redefines this line segment with new endpoints. * * @param firstEndpoint new endpoint of this line segment. Not modified * @param secondEndpoint new second endpoint of this line segment. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code firstEndpoint} are not * expressed in the same reference frame. */ default void set(FramePoint2DReadOnly firstEndpoint, Point2DReadOnly secondEndpoint) { checkReferenceFrameMatch(firstEndpoint); LineSegment2DBasics.super.set(firstEndpoint, secondEndpoint); }
/** * Redefines this line segments with new endpoints. * * @param referenceFrame the reference frame in which the given coordinates are expressed. * @param firstEndpointX x-coordinate of the new first endpoint. * @param firstEndpointY y-coordinate of the new first endpoint. * @param secondEndpointX x-coordinate of the new second endpoint. * @param secondEndpointY y-coordinate of the new second endpoint. * @throws ReferenceFrameMismatchException if {@code this.getReferenceFrame() != referenceFrame}. */ default void set(ReferenceFrame referenceFrame, double firstEndpointX, double firstEndpointY, double secondEndpointX, double secondEndpointY) { checkReferenceFrameMatch(referenceFrame); LineSegment2DBasics.super.set(firstEndpointX, firstEndpointY, secondEndpointX, secondEndpointY); }
/** * Redefines this line segment with new endpoints. * * @param firstEndpoint new endpoint of this line segment. Not modified * @param secondEndpoint new second endpoint of this line segment. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code firstEndpoint} are not * expressed in the same reference frame. */ default void set(FramePoint3DReadOnly firstEndpoint, Point3DReadOnly secondEndpoint) { checkReferenceFrameMatch(firstEndpoint); LineSegment2DBasics.super.set(firstEndpoint, secondEndpoint); }
/** * Redefines this line segment with new endpoints. * * @param referenceFrame the reference frame in which the given coordinates are expressed. * @param firstEndpoint new endpoint of this line segment. Not modified * @param secondEndpoint new second endpoint of this line segment. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code referenceFrame} are not the * same reference frame. */ default void set(ReferenceFrame referenceFrame, Point2DReadOnly firstEndpoint, Point2DReadOnly secondEndpoint) { checkReferenceFrameMatch(referenceFrame); LineSegment2DBasics.super.set(firstEndpoint, secondEndpoint); }
/** * Redefines this line segment with a new first endpoint and a vector going from the first to the * second endpoint. * * @param firstEndpoint new first endpoint. Not modified. * @param fromFirstToSecondEndpoint vector going from the first to the second endpoint. Not * modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code firstEndpoint} are not * expressed in the same reference frame. */ default void set(FramePoint2DReadOnly firstEndpoint, Vector2DReadOnly fromFirstToSecondEndpoint) { checkReferenceFrameMatch(firstEndpoint); LineSegment2DBasics.super.set(firstEndpoint, fromFirstToSecondEndpoint); }
/** * Redefines this line segment with a new first endpoint and a vector going from the first to the * second endpoint. * * @param firstEndpoint new first endpoint. Not modified. * @param fromFirstToSecondEndpoint vector going from the first to the second endpoint. Not * modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code firstEndpoint} are not * expressed in the same reference frame. */ default void set(FramePoint3DReadOnly firstEndpoint, Vector3DReadOnly fromFirstToSecondEndpoint) { checkReferenceFrameMatch(firstEndpoint); LineSegment2DBasics.super.set(firstEndpoint, fromFirstToSecondEndpoint); }
/** * Redefines this line segment with a new first endpoint and a vector going from the first to the * second endpoint. * * @param firstEndpoint new first endpoint. Not modified. * @param fromFirstToSecondEndpoint vector going from the first to the second endpoint. Not * modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code fromFirstToSecondEndpoint} are * not expressed in the same reference frame. */ default void set(Point3DReadOnly firstEndpoint, FrameVector3DReadOnly fromFirstToSecondEndpoint) { checkReferenceFrameMatch(fromFirstToSecondEndpoint); LineSegment2DBasics.super.set(firstEndpoint, fromFirstToSecondEndpoint); }
/** * Redefines this line segment with a new first endpoint and a vector going from the first to the * second endpoint. * * @param firstEndpoint new first endpoint. Not modified. * @param fromFirstToSecondEndpoint vector going from the first to the second endpoint. Not * modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code fromFirstToSecondEndpoint} are * not expressed in the same reference frame. */ default void set(Point2DReadOnly firstEndpoint, FrameVector2DReadOnly fromFirstToSecondEndpoint) { checkReferenceFrameMatch(fromFirstToSecondEndpoint); LineSegment2DBasics.super.set(firstEndpoint, fromFirstToSecondEndpoint); }
/** * Sets this line segment to be same as the given line segment. * * @param other the other line segment to copy. Not modified. */ default void set(LineSegment3DReadOnly other) { set(other.getFirstEndpoint(), other.getSecondEndpoint()); }
protected static void getConnectingEdges(ConvexPolygon2DReadOnly polygon1, ConvexPolygon2DReadOnly polygon2, LineSegment2DBasics connectingEdge1ToPack, LineSegment2DBasics connectingEdge2ToPack, int[][] verticesIndices) { connectingEdge1ToPack.set(polygon1.getVertex(verticesIndices[0][0]), polygon2.getVertex(verticesIndices[1][0])); connectingEdge2ToPack.set(polygon2.getVertex(verticesIndices[1][1]), polygon1.getVertex(verticesIndices[0][1])); }
/** * Sets this line segment to be same as the given line segment. * * @param other the other line segment to copy. Not modified. */ default void set(LineSegment2DReadOnly other) { set(other.getFirstEndpoint(), other.getSecondEndpoint()); }
/** * Redefines this line segment with a new first endpoint and a vector going from the first to the * second endpoint. * * @param firstEndpoint new first endpoint. Not modified. * @param fromFirstToSecondEndpoint vector going from the first to the second endpoint. Not * modified. * @throws ReferenceFrameMismatchException if {@code this}, {@code firstEndpoint}, and * {@code fromFirstToSecondEndpoint} are not expressed in the same reference frame. */ default void set(FramePoint3DReadOnly firstEndpoint, FrameVector3DReadOnly fromFirstToSecondEndpoint) { checkReferenceFrameMatch(firstEndpoint); checkReferenceFrameMatch(fromFirstToSecondEndpoint); LineSegment2DBasics.super.set(firstEndpoint, fromFirstToSecondEndpoint); }
/** * Redefines this line segment with new endpoints. * * @param firstEndpoint new endpoint of this line segment. Not modified * @param secondEndpoint new second endpoint of this line segment. Not modified. * @throws ReferenceFrameMismatchException if {@code this}, {@code firstEndpoint}, and * {@code secondEndpoint} are not expressed in the same reference frame. */ default void set(FramePoint3DReadOnly firstEndpoint, FramePoint3DReadOnly secondEndpoint) { checkReferenceFrameMatch(firstEndpoint); checkReferenceFrameMatch(secondEndpoint); LineSegment2DBasics.super.set(firstEndpoint, secondEndpoint); }
/** * Packs the endpoints of an edge of this polygon into {@code edgeToPack}. * * @param edgeIndex index of the vertex that starts the edge. * @param edgeToPack line segment used to store the edge endpoints. Modified. * @throws OutdatedPolygonException if {@link ConvexPolygon2DBasics#update()} has not been called * since last time this polygon's vertices were edited. * @throws IndexOutOfBoundsException if the given {@code index} is negative or greater or equal * than this polygon's number of vertices. * @throws EmptyPolygonException if this polygon is empty when calling this method. */ default void getEdge(int edgeIndex, LineSegment2DBasics edgeToPack) { edgeToPack.set(getVertex(edgeIndex), getNextVertex(edgeIndex)); }
/** * Redefines this line segment with new endpoints. * * @param firstEndpoint new endpoint of this line segment. Not modified * @param secondEndpoint new second endpoint of this line segment. Not modified. * @throws ReferenceFrameMismatchException if {@code this}, {@code firstEndpoint}, and * {@code secondEndpoint} are not expressed in the same reference frame. */ default void set(FramePoint2DReadOnly firstEndpoint, FramePoint2DReadOnly secondEndpoint) { checkReferenceFrameMatch(firstEndpoint); checkReferenceFrameMatch(secondEndpoint); LineSegment2DBasics.super.set(firstEndpoint, secondEndpoint); }