MeVisLab Scripting Reference
MLWEMNearestPointWrapper Class Reference

Inherits QObject.

Public Slots

QVariant getNearestPoint (const QVector< double > &position)
 

Detailed Description

A class that wraps a WEMNearestPointOnSurface object for use in scripting.

Member Function Documentation

◆ getNearestPoint

QVariant MLWEMNearestPointWrapper::getNearestPoint ( const QVector< double > &  position)
slot

Returns the point on the WEM surface nearest to the given position.

On success, a dictionary is returned containing the following values

  • patch: The patch containing the nearest triangle.
  • triangleIndex: The index of the nearest triangle.
  • barycentricCoordinates: The barycentric coordinates of the point on the triangle.
  • point: The point on the WEM in world coordinates.
  • normal: The normal at this point (interpolated from the corner nodes of the triangle). On failure, (if the WEM is empty) None is returned