Interface BeamIntersectionVisitor

All Superinterfaces:
CLResources
All Known Implementing Classes:
BeamIntersectionVisitorImpl

public interface BeamIntersectionVisitor extends CLResources
This visitor throws a beam towards octree and finds closest intersections ray with facets. The reading of results is separated from calculation, because sometimes we don't need RayIntersection, but only MeshPoint. Minimizing the data reading results in speed-up.
  • Method Details

    • visitOctree

      void visitOctree(OctreeOpenCL octree)
      Visits OpenCl Octree
      Parameters:
      octree - instance of OctreeOpenCL
    • setBeam

      void setBeam(WriteBufferGPU<javax.vecmath.Point3d> originsBuffer, WriteBufferGPU<javax.vecmath.Vector3d> directionsBuffer)
      Stores Ray components in visitor
      Parameters:
      originsBuffer - origin points of ray
      directionsBuffer - common direction of all rays
    • calculateClosestIntersections

      void calculateClosestIntersections()
      Dispatches asynchronous kernel to calculate the closest ray intersections with OctreeOpenCL. The method does not wait for it to finish.
    • readResultsAsMeshPoints

      Set<MeshPoint> readResultsAsMeshPoints()
      Waits for results and then copies them from GPU as MeshPoints Ignores calculated distances to speed-up reading
      Returns:
      Set of closest MeshPoint
    • readResults

      Set<RayIntersection> readResults()
      Checks if the results are ready and then copies them from GPU
      Returns:
      Set of closest RayIntersection