/** * Calculates the coordinates of the point 'p' given the parameter 't' as follows:<br> * p = t * n + p<sub>0</sub><br> * where n is the unit-vector defining the direction of this line and p<sub>0</sub> is the point * defining this line which also corresponds to the point for which t=0. * <p> * Note that the absolute value of 't' is equal to the distance between the point 'p' and the * point p<sub>0</sub> defining this line. * </p> * * @param t the parameter used to calculate the point coordinates. * @param pointToPack the point in which the coordinates of 'p' are stored. Modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code pointToPack} are not * expressed in the same reference frame. */ default void pointOnLineGivenParameter(double t, FixedFramePoint2DBasics pointToPack) { checkReferenceFrameMatch(pointToPack); Line2DReadOnly.super.pointOnLineGivenParameter(t, pointToPack); }
/** * Calculates the coordinates of the point 'p' given the parameter 't' as follows:<br> * p = t * n + p<sub>0</sub><br> * where n is the unit-vector defining the direction of this line and p<sub>0</sub> is the point * defining this line which also corresponds to the point for which t=0. * <p> * Note that the absolute value of 't' is equal to the distance between the point 'p' and the point * p<sub>0</sub> defining this line. * </p> * <p> * WARNING: This method generates garbage. * </p> * * @param t the parameter used to calculate the point coordinates. * @return the coordinates of the point 'p'. */ default Point2DBasics pointOnLineGivenParameter(double t) { Point2D pointToReturn = new Point2D(); pointOnLineGivenParameter(t, pointToReturn); return pointToReturn; }
/** {@inheritDoc} */ @Override default FramePoint2DBasics pointOnLineGivenParameter(double t) { return new FramePoint2D(getReferenceFrame(), Line2DReadOnly.super.pointOnLineGivenParameter(t)); }
/** * Calculates the coordinates of the point 'p' given the parameter 't' as follows:<br> * p = t * n + p<sub>0</sub><br> * where n is the unit-vector defining the direction of this line and p<sub>0</sub> is the point * defining this line which also corresponds to the point for which t=0. * <p> * Note that the absolute value of 't' is equal to the distance between the point 'p' and the * point p<sub>0</sub> defining this line. * </p> * * @param t the parameter used to calculate the point coordinates. * @param pointToPack the point in which the coordinates of 'p' are stored. Modified. */ default void pointOnLineGivenParameter(double t, FramePoint2DBasics pointToPack) { pointToPack.setReferenceFrame(getReferenceFrame()); Line2DReadOnly.super.pointOnLineGivenParameter(t, pointToPack); }