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

Method IsInside

Modules/DataTypesExt/src/mitkCuboid.cpp:35–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35bool mitk::Cuboid::IsInside(const Point3D &worldPoint) const
36{
37 // transform point from world to object coordinates
38 ScalarType p[4];
39 p[0] = worldPoint[0];
40 p[1] = worldPoint[1];
41 p[2] = worldPoint[2];
42 p[3] = 1;
43
44 GetGeometry()->GetVtkTransform()->GetInverse()->TransformPoint(p, p);
45
46 return (p[0] >= -1) && (p[0] <= 1) && (p[1] >= -1) && (p[1] <= 1) && (p[2] >= -1) && (p[2] <= 1);
47}
48
49mitk::ScalarType mitk::Cuboid::GetVolume()
50{

Callers

nothing calls this directly

Calls 3

GetGeometryFunction · 0.85
TransformPointMethod · 0.80
GetVtkTransformMethod · 0.45

Tested by

no test coverage detected