Class Ray3D

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double start
      The start abscissa value for the ray.
    • Constructor Summary

      Constructors 
      Constructor Description
      Ray3D​(Line3D line, double start)
      Construct a ray from a line and a 1D start location.
      Ray3D​(Line3D line, Vector3D startPoint)
      Construct a ray from a line and a start point.
    • Field Detail

      • start

        private final double start
        The start abscissa value for the ray.
    • Constructor Detail

      • Ray3D

        Ray3D​(Line3D line,
              Vector3D startPoint)
        Construct a ray from a line and a start point. The start point is projected onto the line. No validation is performed.
        Parameters:
        line - line for the ray
        startPoint - start point for the ray
      • Ray3D

        Ray3D​(Line3D line,
              double start)
        Construct a ray from a line and a 1D start location. No validation is performed.
        Parameters:
        line - line for the ray
        start - 1D start location
    • Method Detail

      • isInfinite

        public boolean isInfinite()
        Return true if the size of the instance is infinite.

        This method always returns true.

        Returns:
        true if the size of the instance is infinite
      • isFinite

        public boolean isFinite()
        Return true if the size of the instance is finite.

        This method always returns false.

        Returns:
        true if the size of the instance is finite
      • getSize

        public double getSize()
        Get the size of the instance.

        This method always returns Double.POSITIVE_INFINITY.

        Returns:
        the size of the instance
      • getSubspaceStart

        public double getSubspaceStart()
        Get the 1D start location of the line subset or Double.NEGATIVE_INFINITY if no start location exists.
        Specified by:
        getSubspaceStart in class LineConvexSubset3D
        Returns:
        the 1D start location of the line subset or Double.NEGATIVE_INFINITY if no start location exists.
      • getEndPoint

        public Vector3D getEndPoint()
        Get the end point for the line subset.

        This method always returns null.

        Specified by:
        getEndPoint in class LineConvexSubset3D
        Returns:
        the end point for the line subset, or null if no end point exists.
      • getSubspaceEnd

        public double getSubspaceEnd()
        Get the 1D end location of the line subset or Double.POSITIVE_INFINITY if no end location exists.

        This method always returns Double.POSITIVE_INFINITY.

        Specified by:
        getSubspaceEnd in class LineConvexSubset3D
        Returns:
        the 1D end location of the line subset or Double.POSITIVE_INFINITY if no end location exists
      • getCentroid

        public Vector3D getCentroid()
        Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.

        This method always returns null.

        Specified by:
        getCentroid in class LineSubset3D
        Returns:
        the centroid of the line subset, or null if the subset is empty or infinite
      • getBounds

        public Bounds3D getBounds()
        Get the 3D bounding box of the line subset or null if the subset is empty or infinite.

        This method always returns null.

        Specified by:
        getBounds in class LineSubset3D
        Returns:
        the 3D bounding box the line subset or null if the subset is empty or infinite
      • getDirection

        public Vector3D getDirection()
        Get the direction of the ray. This is a convenience method for ray.getLine().getDirection().
        Returns:
        the direction of the ray
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • containsAbscissa

        boolean containsAbscissa​(double abscissa)
        Return true if the given abscissa value is contained in the line subset (ie, in the subspace region or one of its 1D boundaries).
        Specified by:
        containsAbscissa in class LineConvexSubset3D
        Parameters:
        abscissa - abscissa to check
        Returns:
        true if abscissa lies on the inside or boundary of the subspace region