public Ray3d getRay(int index) { LineSegment3d unitSegment = getLineSegment(index, 1.0f); return new Ray3d(unitSegment.getFirstEndpoint(), unitSegment.getDirectionCopy(true)); }

## Javadoc

Computes the vector going from the first to the second endpoint of this line segment.

WARNING: This method generates garbage.

## Popular methods of LineSegment3d

- getFirstEndpoint
- getSecondEndpoint
- <init>Initializes this line segment to have the given endpoints.
- distanceThis methods computes the minimum distance between this line segment and the given one. Useful link
- firstEndpointContainsNaNTest if the first endpoint of this line segment contains Double#NaN.
- getDirectionComputes the vector going from the first to the second endpoint of this line segment.
- getMidpointComputes the coordinates of the point located exactly at the middle of this line segment.
- isBetweenEndpointsTests whether the projection of the given point onto this line segment is located between the two en
- lengthComputes the length of this line segment.
- orthogonalProjectionComputes the orthogonal projection of a 3D point on this 3D line segment. Edge cases: * if the leng
- percentageAlongLineSegmentComputes a percentage along the line segment representing the location of the given point once proje
- pointBetweenEndPointsGivenPercentageComputes the coordinates of the point located at a given percentage on this line segment: pointToPac

## Popular in Java

- Finding current android device location
- setContentView (Activity)
- getApplicationContext (Context)
- getOriginalFilename (MultipartFile)Return the original filename in the client's filesystem.This may contain path information depending
- URLEncoder (java.net)This class is used to encode a string using the format required by application/x-www-form-urlencoded
- HashMap (java.util)HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
- BlockingQueue (java.util.concurrent)A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
- ThreadPoolExecutor (java.util.concurrent)An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
- Options (org.apache.commons.cli)Main entry-point into the library. Options represents a collection of Option objects, which describ
- Color (java.awt)The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
- Top PhpStorm plugins