Package com.io7m.jspatial.api
Interface Ray3DType
-
- All Known Implementing Classes:
Ray3D
@Immutable public interface Ray3DTypeImmutable 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.Vector3Ddirection()default com.io7m.jtensors.core.unparameterized.vectors.Vector3DdirectionInverse()default booleanintersectsVolume(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.Vector3Dorigin()
-
-
-
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:
trueif the ray is intersecting the box.
-
-