Class Raytracer

java.lang.Object
com.zenith.feature.pathfinder.process.elytra.pathfinder.Raytracer

public final class Raytracer extends Object
A ray through the chunk octrees: "An efficient parametric algorithm for octree traversal" (Revelles, Urena, Lastra), as the native Refiner.cpp had it. The traversal only walks positive directions, so the ray is reflected around each x16 node's centre and the child indices are flipped back with a.
  • Method Details

    • raytrace

      public static org.cloudburstmc.math.vector.Vector3d raytrace(NetherPathfinder ctx, double fx, double fy, double fz, double tx, double ty, double tz, NetherPathfinder.CacheMiss fakeChunkMode)
      Traces the segment from (fx, fy, fz) to (tx, ty, tz). Returns where it hit a solid block, or null if it reached its end. The two points must be inside 0 invalid input: '<'= y invalid input: '<' 384, as must be the segment between them. A segment of no length is a point, which is a hit if it is inside a block; a coordinate that is not a finite number is refused.