Class RayIntersectionOpenCLServices

java.lang.Object
cz.fidentis.analyst.opencl.services.raycasting.RayIntersectionOpenCLServices
All Implemented Interfaces:
CLResources

public class RayIntersectionOpenCLServices extends Object implements CLResources
Provides Ray Intersection Services implemented on GPU
  • Constructor Details

    • RayIntersectionOpenCLServices

      public RayIntersectionOpenCLServices(com.jogamp.opencl.CLContext clContext, RayIntersectionOpenCLConfig config)
      Creates instance of Ray Intersection OpenCL Services. Keeps the instance of BeamIntersectionVisitor to allow for re-use of allocated memory
      Parameters:
      clContext - OpenCl Context
      config - Configuration of BeamIntersectionVisitor
  • Method Details

    • release

      public void release()
      Description copied from interface: CLResources
      Explicitly releases GPU resources held by this object
      Specified by:
      release in interface CLResources
    • computeClosestPoints

      public Set<MeshPoint> computeClosestPoints(OctreeOpenCL octree, WriteBufferGPU<javax.vecmath.Point3d> originPoints, WriteBufferGPU<javax.vecmath.Vector3d> direction)
      Computes closest ray intersections between rays and triangles loaded in octree, but reads results only as MeshPoint to save time
      Parameters:
      originPoints - Buffer of origin points
      direction - Buffer of ray direction
      Returns:
      Set of closest ray intersection mesh points
    • computeClosest

      public Set<RayIntersection> computeClosest(OctreeOpenCL octree, WriteBufferGPU<javax.vecmath.Point3d> originPoints, WriteBufferGPU<javax.vecmath.Vector3d> direction)
      Computes closest ray intersections between rays and triangles loaded in octree
      Parameters:
      originPoints - List of ray origin points
      direction - Ray direction vector
      Returns:
      Set of closest ray intersection