/** * Sets this line to be the same as the given line. * * @param referenceFrame the reference frame in which the given line is expressed. * @param line3DReadOnly the line to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this.getReferenceFrame()} and * {@code referenceFrame} are not the same reference frame. */ default void set(ReferenceFrame referenceFrame, Line3DReadOnly line3DReadOnly) { checkReferenceFrameMatch(referenceFrame); set(line3DReadOnly); }
/** * 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); }
/** * Changes the point through which this line has to go. * * @param pointOnLine new point on this line. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code pointOnLine} are not expressed * in the same reference frame. */ default void setPoint(FramePoint3DReadOnly pointOnLine) { checkReferenceFrameMatch(pointOnLine); Line3DBasics.super.setPoint(pointOnLine); }
/** * Sets this line to be the same as the given line expressed in the reference frame of this. * <p> * If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to * {@link #set(FrameLine3DReadOnly)}. * </p> * <p> * If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to * {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}. * </p> * * @param other the other frame line to set this to. Not modified. */ default void setMatchingFrame(FrameLine3DReadOnly other) { Line3DBasics.super.set(other); other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this); }
/** * 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); }
/** * Changes the direction of this line by setting it to the normalized value of the given vector. * * @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 setDirection(FrameVector3DReadOnly lineDirection) { checkReferenceFrameMatch(lineDirection); Line3DBasics.super.setDirection(lineDirection); }
/** * Redefines this line with a new point and a new direction vector. * * @param referenceFrame the reference frame in which the given arguments are expressed. * @param pointOnLine new point on this line. Not modified. * @param lineDirection new direction of this line. Not modified. * @throws ReferenceFrameMismatchException if {@code this.getReferenceFrame()} and * {@code referenceFrame} are not the same reference frame. */ default void set(ReferenceFrame referenceFrame, Point3DReadOnly pointOnLine, Vector3DReadOnly lineDirection) { checkReferenceFrameMatch(referenceFrame); set(pointOnLine, lineDirection); }
/** * Sets this line from the given {@code frameLineSegment3DReadOnly}. * * @param frameLineSegment3DReadOnly the line segment to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code frameLineSegment3DReadOnly} * are not expressed in the same reference frame. */ default void set(FrameLineSegment3DReadOnly frameLineSegment3DReadOnly) { set(frameLineSegment3DReadOnly.getReferenceFrame(), frameLineSegment3DReadOnly); }
/** * Sets this line to go through the endpoints of the given line segment. * * @param referenceFrame the reference frame in which the given line segment is expressed. * @param lineSegment3DReadOnly the line segment to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this.getReferenceFrame()} and * {@code referenceFrame} are not the same reference frame. */ default void set(ReferenceFrame referenceFrame, LineSegment3DReadOnly lineSegment3DReadOnly) { checkReferenceFrameMatch(referenceFrame); set(lineSegment3DReadOnly); }
/** * 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(Point3DReadOnly pointOnLine, FrameVector3DReadOnly lineDirection) { set(lineDirection.getReferenceFrame(), pointOnLine, lineDirection); }
/** * Redefines this line such that it goes through the two given points. * * @param referenceFrame the reference frame in which the given arguments are expressed. * @param firstPointOnLine first point on this line. Not modified. * @param secondPointOnLine second point on this line. Not modified. * @throws ReferenceFrameMismatchException if {@code this.getReferenceFrame()} and * {@code referenceFrame} are not the same reference frame. */ default void set(ReferenceFrame referenceFrame, Point3DReadOnly firstPointOnLine, Point3DReadOnly secondPointOnLine) { checkReferenceFrameMatch(referenceFrame); set(firstPointOnLine, secondPointOnLine); }
/** * 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 pointOnLine} are not expressed * in the same reference frame. */ default void set(FramePoint3DReadOnly pointOnLine, Vector3DReadOnly lineDirection) { set(pointOnLine.getReferenceFrame(), pointOnLine, lineDirection); }
/** * Sets this line to go through the endpoints of the given line segment. * <p> * After calling this method this line is in the XY-plane. * </p> * * @param referenceFrame the reference frame in which the given line segment is expressed. * @param lineSegment2DReadOnly the line segment to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this.getReferenceFrame()} and * {@code referenceFrame} are not the same reference frame. */ default void set(ReferenceFrame referenceFrame, LineSegment2DReadOnly lineSegment2DReadOnly) { checkReferenceFrameMatch(referenceFrame); set(lineSegment2DReadOnly); }
/** * 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(FrameLine3DReadOnly other) { set(other.getReferenceFrame(), other); }
/** * Sets this line to be the same as the given line. * <p> * After calling this method this line is in the XY-plane. * </p> * * @param referenceFrame the reference frame in which the given line is expressed. * @param line2DReadOnly the line to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this.getReferenceFrame()} and * {@code referenceFrame} are not the same reference frame. */ default void set(ReferenceFrame referenceFrame, Line2DReadOnly line2DReadOnly) { checkReferenceFrameMatch(referenceFrame); set(line2DReadOnly); }
/** * Sets this line from the given {@code frameLineSegment2DReadOnly}. * <p> * After calling this method this line is in the XY-plane. * </p> * * @param frameLineSegment2DReadOnly the line segment to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code frameLineSegment2DReadOnly} * are not expressed in the same reference frame. */ default void set(FrameLineSegment2DReadOnly frameLineSegment2DReadOnly) { set(frameLineSegment2DReadOnly.getReferenceFrame(), frameLineSegment2DReadOnly); }
/** * Redefines this line with a new point and a new direction vector. * <p> * After calling this method this line is in the XY-plane. * </p> * * @param referenceFrame the reference frame in which the given arguments are expressed. * @param pointOnLine new point on this line. Not modified. * @param lineDirection new direction of this line. Not modified. * @throws ReferenceFrameMismatchException if {@code this.getReferenceFrame()} and * {@code referenceFrame} are not the same reference frame. */ default void set(ReferenceFrame referenceFrame, Point2DReadOnly pointOnLine, Vector2DReadOnly lineDirection) { checkReferenceFrameMatch(referenceFrame); set(pointOnLine, lineDirection); }
/** * Redefines this line with a new point and a new direction vector. * <p> * After calling this method this line is in the XY-plane. * </p> * * @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 pointOnLine} are not expressed * in the same reference frame. */ default void set(FramePoint2DReadOnly pointOnLine, Vector2DReadOnly lineDirection) { set(pointOnLine.getReferenceFrame(), pointOnLine, lineDirection); }
/** * Redefines this line such that it goes through the two given points. * <p> * After calling this method this line is in the XY-plane. * </p> * * @param referenceFrame the reference frame in which the given arguments are expressed. * @param firstPointOnLine first point on this line. Not modified. * @param secondPointOnLine second point on this line. Not modified. * @throws ReferenceFrameMismatchException if {@code this.getReferenceFrame()} and * {@code referenceFrame} are not the same reference frame. */ default void set(ReferenceFrame referenceFrame, Point2DReadOnly firstPointOnLine, Point2DReadOnly secondPointOnLine) { checkReferenceFrameMatch(referenceFrame); set(firstPointOnLine, secondPointOnLine); }
/** * Sets this line to be the same as the given line. * <p> * After calling this method this line is in the XY-plane. * </p> * * @param referenceFrame the reference frame in which the given line is expressed. * @param frameLine2DReadOnly the line to copy. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code frameLine2DReadOnly} are not * expressed in the same reference frame. */ default void set(FrameLine2DReadOnly frameLine2DReadOnly) { set(frameLine2DReadOnly.getReferenceFrame(), frameLine2DReadOnly); }