/** * Sets the position and orientation parts of this pose 3D to zero and sets the current reference * frame to {@code referenceFrame}. * * @param referenceFrame the new reference frame to be associated with this pose 3D. */ default void setToZero(ReferenceFrame referenceFrame) { setReferenceFrame(referenceFrame); setToZero(); }
/** * Tests on a per component basis if this pose is equal to the given {@code other} to an * {@code epsilon}. * <p> * If the two poses have different frames, this method returns {@code false}. * </p> * * @param other the other pose to compare against this. Not modified. * @param epsilon the tolerance to use when comparing each component. * @return {@code true} if the two poses are equal and are expressed in the same reference frame, * {@code false} otherwise. */ @Override public boolean epsilonEquals(FramePose3D other, double epsilon) { return FramePose3DBasics.super.epsilonEquals(other, epsilon); }
/** * Compares {@code this} to {@code other} to determine if the two poses are geometrically similar. * <p> * Two poses are geometrically equal if both their position and orientation are geometrically equal. * </p> * * @param other the pose to compare to. Not modified. * @param epsilon the tolerance of the comparison. * @return {@code true} if the two poses represent the same geometry, {@code false} otherwise. * @throws ReferenceFrameMismatchException if {@code other} is not expressed in the same reference * frame as {@code this}. */ @Override public boolean geometricallyEquals(FramePose3D other, double epsilon) { return FramePose3DBasics.super.geometricallyEquals(other, epsilon); }
/** * Sets this pose 3D from the given pose 3D and sets the reference frame. * * @param referenceFrame the new reference frame. * @param pose3DReadOnly the pose 3D used to sets the position and orientation. Not modified. */ default void setIncludingFrame(ReferenceFrame referenceFrame, Pose3DReadOnly pose3DReadOnly) { setReferenceFrame(referenceFrame); set(pose3DReadOnly); }
/** * Sets the position and position parts of this pose 3D to {@link Double#NaN} and sets the current * reference frame to {@code referenceFrame}. * * @param referenceFrame the new reference frame to be associated with this pose 3D. */ default void setToNaN(ReferenceFrame referenceFrame) { setReferenceFrame(referenceFrame); setToNaN(); }
public void getFramePoseIncludingFrame(FramePose3DBasics framePoseToPack) { framePoseToPack.setToZero(getReferenceFrame()); getFramePose(framePoseToPack); }
/** * 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); } }
/** * Sets this frame pose 3D to the {@code other} frame pose 3D. * * @param other the other frame pose 3D. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code other} are not expressed in * the same reference frame. */ @Override public void set(FramePose3D other) { FramePose3DBasics.super.set(other); }
/** * Sets this pose 3D to represent the same pose as the given {@code pose2DReadOnly} expressed in the * given {@code referenceFrame}. * * @param referenceFrame the new reference frame. * @param pose2DReadOnly the pose 2D used to set this pose. Not modified. */ default void setIncludingFrame(ReferenceFrame referenceFrame, Pose2DReadOnly pose2DReadOnly) { setReferenceFrame(referenceFrame); set(pose2DReadOnly); }
/** * Sets this frame pose 3D to represent the same pose as the given {@code framePose2DReadOnly}. * * @param framePose2DReadOnly the frame pose 2D used to set this frame pose 3D. Not modified. */ default void setIncludingFrame(FramePose2DReadOnly framePose2DReadOnly) { setIncludingFrame(framePose2DReadOnly.getReferenceFrame(), framePose2DReadOnly); }
/** * Sets this pose 3D from the given reference frame and transform. * * @param referenceFrame the new reference frame. * @param rigidBodyTransform the transform used to set the pose. Not modified. */ default void setIncludingFrame(ReferenceFrame referenceFrame, RigidBodyTransform rigidBodyTransform) { setReferenceFrame(referenceFrame); set(rigidBodyTransform); }
/** * Sets reference frame, position, and orientation. * * @param referenceFrame the new reference frame. * @param position the tuple with the new position coordinates. Not modified. * @param orientation the new orientation. Not modified. */ default void setIncludingFrame(ReferenceFrame referenceFrame, Tuple3DReadOnly position, Orientation3DReadOnly orientation) { setReferenceFrame(referenceFrame); set(position, orientation); }
/** * Sets reference frame, position, and orientation. * * @param position the tuple with the new position coordinates. Not modified. * @param orientation the new orientation. Not modified. * @throws ReferenceFrameMismatchException if {@code position} and {@code orientation} are not * expressed in the same reference frame. */ default void setIncludingFrame(FrameTuple3DReadOnly position, FrameOrientation3DReadOnly orientation) { position.checkReferenceFrameMatch(orientation); setReferenceFrame(position.getReferenceFrame()); set((Tuple3DReadOnly) position, (Orientation3DReadOnly) orientation); }