public class Line3D extends java.lang.Object
| Constructor and Description |
|---|
Line3D(double x0,
double y0,
double z0,
double x1,
double y1,
double z1)
Creates a new line in 3D space between the points
(x0, y0, z0)
and (x1, y1, z1). |
Line3D(Point3D start,
Point3D end)
Creates a new line in 3D space.
|
| Modifier and Type | Method and Description |
|---|---|
static Line3D |
cropLineToAxisAlignedBoundingBox(Line3D line,
double x0,
double x1,
double y0,
double y1,
double z0,
double z1)
Calculates and returns the line segment that is the result of cropping
the specified line segment to fit within an axis aligned bounding box.
|
Point3D |
getEnd()
Returns the ending point for the line.
|
Point3D |
getStart()
Returns the starting point for the line.
|
public Line3D(Point3D start, Point3D end)
start - the starting point (null not permitted).end - the ending point (null not permitted).public Line3D(double x0, double y0, double z0, double x1, double y1, double z1)
(x0, y0, z0)
and (x1, y1, z1).x0 - the x-coordinate for the line's start point.y0 - the y-coordinate for the line's start point.z0 - the z-coordinate for the line's start point.x1 - the x-coordinate for the line's end point.y1 - the y-coordinate for the line's end point.z1 - the z-coordinate for the line's end point.public Point3D getStart()
null).public Point3D getEnd()
null).public static Line3D cropLineToAxisAlignedBoundingBox(Line3D line, double x0, double x1, double y0, double y1, double z0, double z1)
line - the original line segment (null not permitted).x0 - the lower x-bound.x1 - the upper x-bound.y0 - the lower y-bound.y1 - the upper y-bound.z0 - the lower z-bound.z1 - the upper z-bound.null if the original line
segment falls outside the bounding box).