/** * Gets the position and orientation. * * @param positionToPack the tuple used to store the position. Modified. * @param orientationToPack the orientation used to store the orientation. Modified. */ default void get(FrameTuple3DBasics positionToPack, FrameOrientation3DBasics orientationToPack) { positionToPack.setIncludingFrame(getPosition()); orientationToPack.setIncludingFrame(getOrientation()); }
/** * Computes the distance between the position of this pose 3D and the given {@code point}. * * @param point the other point used to measure the distance. Not modified. * @return the distance between this pose and the given {@code point}. * @throws ReferenceFrameMismatchException if {@code point} is not expressed in the same reference * frame as {@code this}. */ default double getPositionDistance(FramePoint3DReadOnly point) { return getPosition().distance(point); }
/** * Sets this frame tuple to {@code other}. * * @param other the other frame tuple to copy the values and reference frame from. Not modified. */ default void setIncludingFrame(FrameTuple2DReadOnly other) { setReferenceFrame(other.getReferenceFrame()); set((Tuple2DReadOnly) other); } }
/** * Sets this frame tuple from the reference frame, x and y components of the given * {@code frameTuple3DReadOnly}. * * @param frameTuple3DReadOnly the tuple to copy the values and reference frame from. Not modified. */ default void setIncludingFrame(FrameTuple3DReadOnly frameTuple3DReadOnly) { setReferenceFrame(frameTuple3DReadOnly.getReferenceFrame()); set((Tuple3DReadOnly) frameTuple3DReadOnly); }
/** * Add a vertex to this polygon using only the x and y coordinates of the given {@code vertex}. * * @param vertex the new vertex. Not modified. * @see #addVertexMatchingFrame(ReferenceFrame, Point3DReadOnly) * @see #addVertex(Point3DReadOnly) */ default void addVertexMatchingFrame(FramePoint3DReadOnly vertex) { addVertexMatchingFrame(vertex.getReferenceFrame(), vertex); }
/** * Redefines this line such that it goes through the two given points. * * @param firstPointOnLine first point on this line. Not modified. * @param secondPointOnLine second point on this line. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code firstPointOnLine} are not * expressed in the same reference frame. */ default void set(FramePoint3DReadOnly firstPointOnLine, Point3DReadOnly secondPointOnLine) { set(firstPointOnLine.getReferenceFrame(), firstPointOnLine, secondPointOnLine); }
/** * Redefines this line such that it goes through the two given points. * * @param firstPointOnLine first point on this line. Not modified. * @param secondPointOnLine second point on this line. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code secondPointOnLine} are not * expressed in the same reference frame. */ default void set(Point3DReadOnly firstPointOnLine, FramePoint3DReadOnly secondPointOnLine) { set(secondPointOnLine.getReferenceFrame(), firstPointOnLine, secondPointOnLine); }
/** * Sets this frame pose 3D to the {@code other} frame pose 3D. * * @param other the other frame pose 3D. Not modified. */ default void setIncludingFrame(FramePose3DReadOnly other) { setIncludingFrame(other.getReferenceFrame(), other); } }
/** * Changes the first endpoint of this line segment. * * @param firstEndpoint new 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 setFirstEndpoint(FramePoint3DReadOnly firstEndpoint) { getFirstEndpoint().set(firstEndpoint); }
/** * Redefines this line such that it goes through the two given points in the given reference frame. * * @param firstPointOnLine first point on this line. Not modified. * @param secondPointOnLine second point on this line. Not modified. */ default void setIncludingFrame(FramePoint2DReadOnly firstPointOnLine, Point2DReadOnly secondPointOnLine) { setIncludingFrame(firstPointOnLine.getReferenceFrame(), firstPointOnLine, secondPointOnLine); }
/** * Changes the second endpoint of this line segment. * * @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 setSecondEndpoint(FramePoint2DReadOnly secondEndpoint) { setSecondEndpoint(secondEndpoint.getReferenceFrame(), secondEndpoint); }
/** * Redefines this line such that it goes through the two given points. * * @param firstPointOnLine first point on this line. Not modified. * @param secondPointOnLine second point on this line. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code secondPointOnLine} are not * expressed in the same reference frame. */ default void set(Point2DReadOnly firstPointOnLine, FramePoint2DReadOnly secondPointOnLine) { set(secondPointOnLine.getReferenceFrame(), firstPointOnLine, secondPointOnLine); }
/** * Sets this line to be the same as the given line. * * @param other the other line to copy. Not modified. */ default void setIncludingFrame(FrameLine2DReadOnly other) { setIncludingFrame(other.getReferenceFrame(), other); }
/** * Sets this matrix to {@code other}. * * @param other the other frame matrix to copy the values of. Not modified. * @throws ReferenceFrameMismatchException if the matrix is not expressed in the same reference * frame as {@code this}. */ default void set(FrameMatrix3DReadOnly other) { set(other.getReferenceFrame(), other); }
/** * Redefines this line with a new point and a new direction vector. * * @param pointOnLine new point on this line. Not modified. * @param lineDirection new direction of this line. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code lineDirection} are not * expressed in the same reference frame. */ default void set(Point2DReadOnly pointOnLine, FrameVector2DReadOnly lineDirection) { set(lineDirection.getReferenceFrame(), pointOnLine, lineDirection); }
/** * Clears this polygon, adds a single vertex at ({@link Double#NaN}, {@link Double#NaN}), and * updates it. * * @param referenceFrame the new reference frame for this frame convex polygon. * @see #setToNaN() */ default void setToNaN(ReferenceFrame referenceFrame) { setReferenceFrame(referenceFrame); FixedFrameConvexPolygon2DBasics.super.setToNaN(); }
/** * Sets this line to be the same as the given line. * * @param referenceFrame the reference frame in which the given line is expressed. * @param other the line to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code other} are not expressed in * the same reference frame. */ default void set(FrameLine2DReadOnly other) { set(other.getReferenceFrame(), other); }
/** * Sets this line to be the same as the given line projected onto the XY-plane. * * @param frameLine3DReadOnly the line to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code frameLine3DReadOnly} are * not expressed in the same reference frame. */ default void set(FrameLine3DReadOnly frameLine3DReadOnly) { set(frameLine3DReadOnly.getReferenceFrame(), frameLine3DReadOnly); }
/** * Sets this yaw-pitch-roll to the same value as the given {@code other} and updates the reference * frame. * * @param other the other yaw-pitch-roll. Not modified. */ default void setIncludingFrame(FrameYawPitchRollReadOnly other) { setIncludingFrame(other.getReferenceFrame(), other); }
/** * Redefines this line with a new point, a new direction vector, and a new reference frame. * * @param pointOnLine new point on this line. Not modified. * @param lineDirection new direction of this line. Not modified. */ default void setIncludingFrame(FramePoint2DReadOnly pointOnLine, Vector2DReadOnly lineDirection) { setIncludingFrame(pointOnLine.getReferenceFrame(), pointOnLine, lineDirection); }