Interface RayIntersectionServices


public interface RayIntersectionServices
Stateless services for ray casting. It is a wrapper to the stateful implementation in RayIntersectionVisitor.
  • Method Details

    • computeUnsorted

      static List<RayIntersection> computeUnsorted(Collection<Octree> octrees, RayIntersectionConfig config)
      Returns ray intersections in random order and without distances.
      Parameters:
      octrees - Meshes to be tested for ray intersection
      config - Configuration of the service
      Returns:
      found intersections
    • computeUnsorted

      static List<RayIntersection> computeUnsorted(Octree kdTree, RayIntersectionConfig config)
      Returns ray intersections in random order and without distances.
      Parameters:
      kdTree - Mesh to be tested for ray intersection
      config - Configuration of the service
      Returns:
      found intersections
    • computeSorted

      static SortedSet<RayIntersection> computeSorted(Collection<Octree> octrees, RayIntersectionConfig config)
      Returns found ray intersections sorted by distances.
      Parameters:
      octrees - Meshes to be tested for ray intersection
      config - Configuration of the service
      Returns:
      found intersections
    • computeSorted

      static SortedSet<RayIntersection> computeSorted(Octree octree, RayIntersectionConfig strategy)
      Returns found ray intersections sorted by distances.
      Parameters:
      octree - Mesh to be tested for ray intersection. Must not be null
      strategy - Ray casting strategy and params. Must not be null
      Returns:
      found intersections
    • computeClosest

      static RayIntersection computeClosest(Collection<Octree> octrees, RayIntersectionConfig strategy)
      Returns a closets intersection point, either positive or negative, or null.
      Parameters:
      octrees - Meshes to be tested for ray intersection. Must not be null
      strategy - Ray casting strategy and params. Must not be null
      Returns:
      found intersection
    • computeClosest

      static RayIntersection computeClosest(Octree octree, RayIntersectionConfig strategy)
      Returns a closets intersection point, either positive or negative, or null.
      Parameters:
      octree - Mesh to be tested for ray intersection. Must not be null
      strategy - Ray casting strategy and params. Must not be null
      Returns:
      found intersection