java.lang.Object
org.jfree.chart3d.graphics3d.Line3D
A line segment in 3D space.
- Since:
- 1.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.getEnd()
Returns the ending point for the line.getStart()
Returns the starting point for the line.
-
Constructor Details
-
Line3D
Creates a new line in 3D space.- Parameters:
start
- the starting point (null
not permitted).end
- the ending point (null
not permitted).
-
Line3D
Creates a new line in 3D space between the points(x0, y0, z0)
and(x1, y1, z1)
.- Parameters:
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.
-
-
Method Details
-
getStart
Returns the starting point for the line.- Returns:
- The starting point (never
null
).
-
getEnd
Returns the ending point for the line.- Returns:
- The ending point (never
null
).
-
cropLineToAxisAlignedBoundingBox
public 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.- Parameters:
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.- Returns:
- The cropped line segment (or
null
if the original line segment falls outside the bounding box).
-