MeVisLab Scripting Reference
MLWEMNearestPointWrapper Class Reference

#include <mlWEMNearestPointWrapper.h>

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

Return point on WEM surface nearest to 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 (when the WEM is empty) None is returned