Class MeshDistanceRC
- All Implemented Interfaces:
MeshVisitor
,MeshDistanceVisitor
,Serializable
This visitor is instantiated with a single octree (either given as the input parameter, or automatically created from the triangular mesh). When applied to other mesh facets, it finds points from the octree that are the closest to each point of the inspected mesh.
This visitor is thread-safe, i.e., a single instance of the visitor can be used to inspect multiple meshes simultaneously.
The distance is computed either as absolute or relative. Absolute represents Euclidean distance (all numbers are positive). On the contrary, relative distance considers orientation of the visited mesh (determined by its normal vectors) and produces positive or negative distances depending on whether the primary mesh is "in front of" or "behind" the given vertex.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMeshDistanceRC
(Octree mainOctree, boolean relativeDistance, boolean parallel) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
updateResults
(RayIntersectionVisitor vis, List<Double> distList, List<MeshPoint> nearestPointsList) void
visitMeshFacet
(MeshFacet comparedFacet) The inspection method to be implemented by specific visitors.Methods inherited from class cz.fidentis.analyst.engines.distance.impl.MeshDistanceVisitorImpl
dispose, 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
-
MeshDistanceRC
Constructor.- Parameters:
mainOctree
- An octree to which distance from the visited facets is to be computed. Must not benull
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
- Iftrue
, then the algorithm runs concurrently utilizing all CPU cores- 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.
-
updateResults
protected void updateResults(RayIntersectionVisitor vis, List<Double> distList, List<MeshPoint> nearestPointsList)
-