Class RayIntersectionOpenCLServices
java.lang.Object
cz.fidentis.analyst.opencl.services.raycasting.RayIntersectionOpenCLServices
- All Implemented Interfaces:
CLResources
Provides Ray Intersection Services implemented on GPU
-
Constructor Summary
ConstructorsConstructorDescriptionRayIntersectionOpenCLServices
(com.jogamp.opencl.CLContext clContext, RayIntersectionOpenCLConfig config) Creates instance of Ray Intersection OpenCL Services. -
Method Summary
Modifier and TypeMethodDescriptioncomputeClosest
(OctreeOpenCL octree, WriteBufferGPU<javax.vecmath.Point3d> originPoints, WriteBufferGPU<javax.vecmath.Vector3d> direction) Computes closest ray intersections between rays and triangles loaded in octreecomputeClosestPoints
(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 asMeshPoint
to save timevoid
release()
Explicitly releases GPU resources held by this object
-
Constructor Details
-
RayIntersectionOpenCLServices
public RayIntersectionOpenCLServices(com.jogamp.opencl.CLContext clContext, RayIntersectionOpenCLConfig config) Creates instance of Ray Intersection OpenCL Services. Keeps the instance ofBeamIntersectionVisitor
to allow for re-use of allocated memory- Parameters:
clContext
- OpenCl Contextconfig
- Configuration ofBeamIntersectionVisitor
-
-
Method Details
-
release
public void release()Description copied from interface:CLResources
Explicitly releases GPU resources held by this object- Specified by:
release
in interfaceCLResources
-
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 asMeshPoint
to save time- Parameters:
originPoints
- Buffer of origin pointsdirection
- 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 pointsdirection
- Ray direction vector- Returns:
- Set of closest ray intersection
-