/** * Sets this line to be the same as the given line. * * @param other the other line to copy. Not modified. */ @Override public void set(Line3D other) { Line3DBasics.super.set(other); }
/** * 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 lineSegment2DReadOnly the line segment to get the endpoints from. Not modified. */ default void set(LineSegment2DReadOnly lineSegment2DReadOnly) { set(lineSegment2DReadOnly.getFirstEndpoint(), lineSegment2DReadOnly.getSecondEndpoint()); }
/** * Sets this line to go through the endpoints of the given line segment. * * @param lineSegment3DReadOnly the line segment to get the endpoints from. Not modified. */ default void set(LineSegment3DReadOnly lineSegment3DReadOnly) { set(lineSegment3DReadOnly.getFirstEndpoint(), lineSegment3DReadOnly.getSecondEndpoint()); }
/** * 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); }