@@ -0,0 +1,1198 @@
+import vtk.vtkNativeLibrary;%0Aimport vtk.vtkMath;%0A%0A%0Apublic class DistanceBetweenPoints %0A%7B%0A%09// -----------------------------------------------------------------%0A%09// Load VTK library and print which library was not properly loaded%0A%09static %0A%09%7B%0A%09%09if (!vtkNativeLibrary.LoadAllNativeLibraries()) %0A%09%09%7B%0A%09%09%09for (vtkNativeLibrary lib : vtkNativeLibrary.values()) %0A%09%09%09%7B%0A%09%09%09%09if (!lib.IsLoaded()) %0A%09%09%09%09%7B%0A%09%09%09%09%09System.out.println(lib.GetLibraryName() + %22 not loaded%22);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09vtkNativeLibrary.DisableOutputWindow(null);%0A%09%7D%0A%09// -----------------------------------------------------------------%0A%09%0A%09public static void main(String s%5B%5D) %0A%09%7B%09%09%09%09%09  %0A%09%09// Create two points.%0A%09%09double p0%5B%5D = new double%5B%5D %7B0.0, 0.0, 0.0%7D;%0A%09%09double p1%5B%5D = new double%5B%5D %7B1.0, 1.0, 1.0%7D;%0A%09%09%0A%09%09// Find the squared distance between the points.%0A%09%09vtkMath squaredDistance = new vtkMath();%0A%09%09double squaredDist = squaredDistance.Distance2BetweenPoints(p0, p1);%0A%09%09%0A%09%09// Take the square root to get the Euclidean distance between the points.%0A%09%09double distance = Math.sqrt(squaredDist);%0A%09%09%0A%09%09// Output the results.%0A%09%09System.out.println(%22Squared Distance:%22 + %22 %22 + squaredDist);%0A%09%09System.out.println(%22Distance:%22 + %22 %22 + distance);%0A%0A%09%7D%09%09  %0A%7D%0A

Create DistanceBetweenPoints.java