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

public class MeshDistancePreciseGPU extends MeshDistanceVisitorImpl
!!!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 Details

    • MeshDistancePreciseGPU

      public MeshDistancePreciseGPU(TriangleKdTree kdTree, boolean relativeDistance, boolean parallel)
      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

      public void visitMeshFacet(MeshFacet comparedFacet)
      Description copied from interface: MeshVisitor
      The inspection method to be implemented by specific visitors.
      Parameters:
      comparedFacet - Mesh facet to be visited.
    • findClosestInLeaf

      public javax.vecmath.Point3d findClosestInLeaf(MeshPoint point, TriangleKdNode leaf)
      Finds closest point on triangles stored in leaf. Runs on GPU.
      Parameters:
      point - point to which we are searching for the closest point
      leaf - 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 interface MeshVisitor
      Overrides:
      dispose in class MeshDistanceVisitorImpl