public Vector3d getNormalizedVector() { return line.getNormalizedVector(); }
public Vector3d getNormalizedVectorCopy() { return new Vector3d(line.getNormalizedVector()); }
public FrameVector getFrameNormalizedVectorCopy() { return new FrameVector(referenceFrame, line.getNormalizedVector()); }
/** * Compute the 3D equivalent of this line segment. * The 3D equivalent of each end point is computed as follows: * {@code endPoint3d = endPoint1d * lineDirection3d + lineStart3d}. * @param line3d the 3D line used as reference to compute the 3D line segment. * @return the 3D equivalent of this line segment. */ public LineSegment3d toLineSegment3d(Line3d line3d) { return toLineSegment3d(line3d.getPoint(), line3d.getNormalizedVector()); }
public void projectOntoXYPlane(Line2d lineToPack) { lineToPack.set(line.getPoint().getX(), line.getPoint().getY(), line.getNormalizedVector().getX(), line.getNormalizedVector().getY()); }
public void projectOntoXYPlane(FrameLine2d lineToPack) { lineToPack.set(getReferenceFrame(), line.getPoint().getX(), line.getPoint().getY(), line.getNormalizedVector().getX(), line.getNormalizedVector().getY()); }
public void projectOntoXYPlane(Point2d pointToPack, Vector2d normalizedVectorToPack) { pointToPack.set(line.getPoint().getX(), line.getPoint().getY()); normalizedVectorToPack.set(line.getNormalizedVector().getX(), line.getNormalizedVector().getY()); if (GeometryTools.isZero(normalizedVectorToPack, 1e-12)) { normalizedVectorToPack.set(Double.NaN, Double.NaN); } else { normalizedVectorToPack.normalize(); } } }