com.orsoncharts.graphics3d

## Class Line3D

- java.lang.Object
- - com.orsoncharts.graphics3d.Line3D

-     public class Line3D
      extends java.lang.Object

  A line segment in 3D space.
  Since:
    1.5

- - ### Constructor Summary

    Constructors
    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.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Line3D

          public Line3D(Point3D start,
                        Point3D end)

      Creates a new line in 3D space.
      Parameters:
        `start` - the starting point (`null` not permitted).
        `end` - the ending point (`null` not permitted).

    - #### Line3D

          public 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)`.
      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 Detail

    - #### getStart

          public Point3D getStart()

      Returns the starting point for the line.
      Returns:
        The starting point (never `null`).

    - #### getEnd

          public Point3D 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).