/** * Computes the vector going from the first to the second endpoint of this line segment. * <p> * WARNING: This method generates garbage. * </p> * * @param normalize whether the direction vector is to be normalized. * @return the direction of this line segment. */ public Vector3d getDirectionCopy(boolean normalize) { Vector3d direction = new Vector3d(); getDirection(normalize, direction); return direction; }
public void getDirection(boolean normalize, FrameVector directionToPack) { checkReferenceFrameMatch(directionToPack); lineSegment3d.getDirection(normalize, directionToPack.getVector()); }