Interface Ray3DType

  • All Known Implementing Classes:
    Ray3D

    @Immutable
    public interface Ray3DType
    Immutable three-dimensional ray type, defined as an origin and a direction vector.
    Since:
    3.0.0
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      com.io7m.jtensors.core.unparameterized.vectors.Vector3D direction()  
      default com.io7m.jtensors.core.unparameterized.vectors.Vector3D directionInverse()  
      default boolean intersectsVolume​(double x0, double y0, double z0, double x1, double y1, double z1)
      Branchless optimization of the Kay-Kajiya slab ray/AABB intersection test by Tavian Barnes.
      com.io7m.jtensors.core.unparameterized.vectors.Vector3D origin()  
    • Method Detail

      • origin

        @Parameter
        com.io7m.jtensors.core.unparameterized.vectors.Vector3D origin()
        Returns:
        The origin point of this ray
      • direction

        @Parameter
        com.io7m.jtensors.core.unparameterized.vectors.Vector3D direction()
        Returns:
        The direction of this ray
      • directionInverse

        @Derived
        @Auxiliary
        default com.io7m.jtensors.core.unparameterized.vectors.Vector3D directionInverse()
        Returns:
        The inverted direction of this ray
      • intersectsVolume

        default boolean intersectsVolume​(double x0,
                                         double y0,
                                         double z0,
                                         double x1,
                                         double y1,
                                         double z1)

        Branchless optimization of the Kay-Kajiya slab ray/AABB intersection test by Tavian Barnes.

        See tavianator.com .

        Parameters:
        x0 - The lower X coordinate.
        x1 - The upper X coordinate.
        y0 - The lower Y coordinate.
        y1 - The upper Y coordinate.
        z0 - The lower Z coordinate.
        z1 - The upper Z coordinate.
        Returns:
        true if the ray is intersecting the box.