Interface RaycastAABB.RaycastConsumer

Enclosing class:
RaycastAABB
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface RaycastAABB.RaycastConsumer
Raycast Consumer

The boolean hit contains TRUE if a the AABB was hit.

The Vector (ox, oy, oz) contains the origin vector of the ray, which was used to run the test. The Vector (dx, dy, dz) contains the direction vector of the ray, which was used to run the test.

The Vector (nx, ny, nz) contains information about the side that is being hit. If nx == 1: the intersection happens on the side on the positive x-axis. If nx == 1 && ny == 1: the intersection happens on the edge of the side positive x and positive y. If nx == 1 && ny == 1 && nz == -1: the intersection happens on the corner of the side positive x, positive y and negative z.

Getting the point of intersection: x = ox + dx * t y = oy + dy * t z = oz + dz * t

Since:
10.01.2017
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(boolean hit, double ox, double oy, double oz, double dx, double dy, double dz, double t, double nx, double ny, double nz)
     
  • Method Details

    • accept

      void accept(boolean hit, double ox, double oy, double oz, double dx, double dy, double dz, double t, double nx, double ny, double nz)