Class MeshDistancePreciseGPU
java.lang.Object
cz.fidentis.analyst.engines.distance.impl.MeshDistanceVisitorImpl
cz.fidentis.analyst.engines.distance.impl.MeshDistancePreciseGPU
- All Implemented Interfaces:
MeshVisitor
,MeshDistanceVisitor
,Serializable
!!!EXPERIMENTAL!!! Use bruteforce version of POINT_TO_TRIANGLE, which is also precise.
Finds precise closest point on triangles.
Utilizes a TriangleKdTree and GPU search of closest point on triangles.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMeshDistancePreciseGPU
(TriangleKdTree kdTree, boolean relativeDistance, boolean parallel) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Dispose all disposable resources this visitor was using.javax.vecmath.Point3d
findClosestInLeaf
(MeshPoint point, TriangleKdNode leaf) Finds closest point on triangles stored in leaf.void
visitMeshFacet
(MeshFacet comparedFacet) The inspection method to be implemented by specific visitors.Methods inherited from class cz.fidentis.analyst.engines.distance.impl.MeshDistanceVisitorImpl
getDistancesOfVisitedFacets, inParallel, relativeDistance
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.fidentis.analyst.data.mesh.MeshVisitor
isThreadSafe
-
Constructor Details
-
MeshDistancePreciseGPU
Constructor.- Parameters:
kdTree
- TriangleKdTree of primary mesh to which other distances should be calculated.relativeDistance
- If true, then the visitor calculates the relative distances with respect to the normal vectors of source facets (normal vectors have to present), i.e., we can get negative distances.parallel
- If the tree traversal should be parallelized. Testing showed that parallel traversal is around 1s slower as the running of the GPU kernel must be serialized.- Throws:
IllegalArgumentException
- if some parameter is wrong
-
-
Method Details
-
visitMeshFacet
Description copied from interface:MeshVisitor
The inspection method to be implemented by specific visitors.- Parameters:
comparedFacet
- Mesh facet to be visited.
-
findClosestInLeaf
Finds closest point on triangles stored in leaf. Runs on GPU.- Parameters:
point
- point to which we are searching for the closest pointleaf
- leaf node of a TriangleKdTree storing triangles- Returns:
- closest point to
point
located on triangles
-
dispose
public void dispose()Description copied from interface:MeshVisitor
Dispose all disposable resources this visitor was using. Distances can still be retrieved after calling this method. Subclasses should override this method if they need to dispose something.- Specified by:
dispose
in interfaceMeshVisitor
- Overrides:
dispose
in classMeshDistanceVisitorImpl
-