MCPcopy Create free account
hub / github.com/MITK/MITK / SignedDistanceFromPlane

Function SignedDistanceFromPlane

Modules/Core/include/mitkPlaneGeometry.h:345–353  ·  view source on GitHub ↗

* \brief Signed distance of the point from the plane * (bounding-box \em not considered) * * > 0 : point is in the direction of the direction vector. */

Source from the content-addressed store, hash-verified

343 * > 0 : point is in the direction of the direction vector.
344 */
345 inline ScalarType SignedDistanceFromPlane(const Point3D &pt3d_mm) const
346 {
347 ScalarType len = GetNormalVnl().two_norm();
348
349 if (len == 0)
350 return 0;
351
352 return (pt3d_mm - GetOrigin()) * GetNormal() / len;
353 }
354
355 /**
356 * \brief Distance of the plane from another plane

Callers 3

SignedDistanceMethod · 0.85
IsAboveMethod · 0.85
DistanceFromPlaneFunction · 0.85

Calls 2

GetOriginFunction · 0.85
GetOriginMethod · 0.45

Tested by

no test coverage detected