Interface BeamIntersectionVisitor
- All Superinterfaces:
CLResources
- All Known Implementing Classes:
BeamIntersectionVisitorImpl
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 Summary
Modifier and TypeMethodDescriptionvoid
Dispatches asynchronous kernel to calculate the closest ray intersections withOctreeOpenCL
.Checks if the results are ready and then copies them from GPUWaits for results and then copies them from GPU as MeshPoints Ignores calculated distances to speed-up readingvoid
setBeam
(WriteBufferGPU<javax.vecmath.Point3d> originsBuffer, WriteBufferGPU<javax.vecmath.Vector3d> directionsBuffer) StoresRay
components in visitorvoid
visitOctree
(OctreeOpenCL octree) Visits OpenCl OctreeMethods inherited from interface cz.fidentis.analyst.opencl.memory.CLResources
release
-
Method Details
-
visitOctree
Visits OpenCl Octree- Parameters:
octree
- instance ofOctreeOpenCL
-
setBeam
void setBeam(WriteBufferGPU<javax.vecmath.Point3d> originsBuffer, WriteBufferGPU<javax.vecmath.Vector3d> directionsBuffer) StoresRay
components in visitor- Parameters:
originsBuffer
- origin points of raydirectionsBuffer
- common direction of all rays
-
calculateClosestIntersections
void calculateClosestIntersections()Dispatches asynchronous kernel to calculate the closest ray intersections withOctreeOpenCL
. The method does not wait for it to finish. -
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
-