/** * Add a vertex to this polygon using only the x and y coordinates of the given {@code vertex}. * * @param referenceFrame the reference frame in which the given {@code vertex} is expressed. * @param vertex the new vertex. Not modified. * @throws ReferenceFrameMismatchException if {@code referenceFrame} and * {@code this.getReferenceFrame()} are not the same. * @see #addVertex(Point3DReadOnly) */ default void addVertex(ReferenceFrame referenceFrame, Point3DReadOnly vertex) { checkReferenceFrameMatch(referenceFrame); addVertex(vertex); }
/** * Add a vertex to this polygon. * * @param referenceFrame the reference frame in which the given {@code vertex} is expressed. * @param vertex the new vertex. Not modified. * @throws ReferenceFrameMismatchException if {@code referenceFrame} and * {@code this.getReferenceFrame()} are not the same. * @see #addVertex(Point2DReadOnly) */ default void addVertex(ReferenceFrame referenceFrame, Point2DReadOnly vertex) { checkReferenceFrameMatch(referenceFrame); addVertex(vertex); }
/** * Add a vertex to this polygon. * * @param referenceFrame the reference frame in which the given vertex is expressed. * @param x the x-coordinate of the new vertex. * @param y the y-coordinate of the new vertex. * @throws ReferenceFrameMismatchException if {@code referenceFrame} and * {@code this.getReferenceFrame()} are not the same. * @see #addVertex(double, double) */ default void addVertex(ReferenceFrame referenceFrame, double x, double y) { checkReferenceFrameMatch(referenceFrame); addVertex(x, y); }
/** * Adds the vertices from the given vertex supplier. * <p> * Note that this polygon is marked as being out-of-date. The method {@link #update()} has to be * called afterward before being able to perform operations with this polygon. * </p> * * @param frameVertex2DSupplier the supplier of vertices. * @throws ReferenceFrameMismatchException if any of the given {@code vertices} is a * {@code FramePoint2DReadOnly} and is not expressed in the same reference frame as * {@code this}. * @see FrameVertex2DSupplier * @see #addVertex(FramePoint2DReadOnly) */ default void addVertices(FrameVertex2DSupplier frameVertex2DSupplier) { for (int index = 0; index < frameVertex2DSupplier.getNumberOfVertices(); index++) { addVertex(frameVertex2DSupplier.getVertex(index)); } }
/** * Adds the vertices from the given vertex supplier. * <p> * Note that this polygon is marked as being out-of-date. The method {@link #update()} has to be * called afterward before being able to perform operations with this polygon. * </p> * <p> * Only the x and y coordinates of each vertex is used to add a vertex to this polygon. * </p> * * @param frameVertex3DSupplier the supplier of vertices. * @throws ReferenceFrameMismatchException if any of the given {@code vertices} is a * {@code FramePoint3DReadOnly} and is not expressed in the same reference frame as * {@code this}. * @see FrameVertex3DSupplier * @see #addVertex(FramePoint3DReadOnly) */ default void addVertices(FrameVertex3DSupplier frameVertex3DSupplier) { for (int index = 0; index < frameVertex3DSupplier.getNumberOfVertices(); index++) { addVertex(frameVertex3DSupplier.getVertex(index)); } }