Class UtilPoint3D_F64

java.lang.Object
georegression.geometry.UtilPoint3D_F64

public class UtilPoint3D_F64 extends Object
  • Constructor Details

    • UtilPoint3D_F64

      public UtilPoint3D_F64()
  • Method Details

    • findClosestIdx

      public static int findClosestIdx(double x, double y, double z, List<Point3D_F64> pts, double tol)
      Finds the closest point in the list to the specified point that is within tolerance. Returns the index of the point or -1 if none was found.
      Parameters:
      tol - Tolerance in Euclidean distance.
    • distance

      public static double distance(double x0, double y0, double z0, double x1, double y1, double z1)
      Euclidean distance between the two specified points
      Parameters:
      x0 - x-axis on Point 0
      y0 - y-axis on Point 0
      z0 - z-axis on Point 0
      x1 - x-axis on Point 1
      y1 - y-axis on Point 1
      z1 - z-axis on Point 1
      Returns:
      Euclidean distance
    • distanceSq

      public static double distanceSq(double x0, double y0, double z0, double x1, double y1, double z1)
      Euclidean distance squared between the two specified points
      Parameters:
      x0 - x-axis on Point 0
      y0 - y-axis on Point 0
      z0 - z-axis on Point 0
      x1 - x-axis on Point 1
      y1 - y-axis on Point 1
      z1 - z-axis on Point 1
      Returns:
      Euclidean distance squared
    • norm

      public static double norm(double x, double y, double z)
    • copy

      public static List<Point3D_F64> copy(List<Point3D_F64> pts)
    • noiseNormal

      public static Point3D_F64 noiseNormal(Point3D_F64 mean, double sigmaX, double sigmaY, double sigmaZ, Random rand, @Nullable @Nullable Point3D_F64 output)
    • noiseNormal

      public static void noiseNormal(List<Point3D_F64> pts, double sigma, Random rand)
    • random

      public static List<Point3D_F64> random(PlaneNormal3D_F64 plane, double max, int num, Random rand)
      Randomly generates a set of points on the plane centered at the plane's origin using a uniform distribution.
      Parameters:
      plane - Plane
      max - Maximum distance from center
      rand - random number generator
      Returns:
      set of points on the plane
    • randomNormals

      public static List<PlaneNormal3D_F64> randomNormals(PlaneNormal3D_F64 plane, double max, int num, Random rand)
    • random

      public static List<Point3D_F64> random(Cylinder3D_F64 shape, int radialRadius, int count, Random rand)
    • randomNormals

      public static List<PlaneNormal3D_F64> randomNormals(Cylinder3D_F64 shape, int radialRadius, int count, Random rand)
      Points randomly along a cylinder with surface normals
    • random

      public static List<Point3D_F64> random(double min, double max, int num, Random rand)
    • random

      public static List<Point3D_F64> random(Point3D_F64 mean, double minX, double maxX, double minY, double maxY, double minZ, double maxZ, int num, Random rand)
      Creates a list of random points from a uniform distribution along each axis
    • random

      public static List<Point3D_F64> random(Point3D_F64 mean, double min, double max, int num, Random rand)
    • randomN

      public static List<Point3D_F64> randomN(Point3D_F64 mean, double stdX, double stdY, double stdZ, int num, Random rand)
      Creates a list of random points from a normal distribution along each axis
    • randomN

      public static List<Point3D_F64> randomN(Point3D_F64 mean, double stdev, int num, Random rand)
    • mean

      public static Point3D_F64 mean(List<Point3D_F64> points, @Nullable @Nullable Point3D_F64 mean)
      Computes the mean of the list of points.
      Parameters:
      points - List of points
      mean - (Optional) storage for the mean. Can be null
      Returns:
      Mean
    • mean

      public static Point3D_F64 mean(List<Point3D_F64> points, int num, @Nullable @Nullable Point3D_F64 mean)
      Computes the mean of the list of points up to element num.
      Parameters:
      points - List of points
      num - use points up to num, exclusive.
      mean - (Optional) storage for the mean. Can be null
      Returns:
      Mean
    • boundingBox

      public static void boundingBox(List<Point3D_F64> points, Box3D_F64 bounding)
      Finds the minimal volume Box3D_F64 which contains all the points.
      Parameters:
      points - Input: List of points.
      bounding - Output: Bounding box
    • axisLargestAbs

      public static int axisLargestAbs(GeoTuple3D_F64<?> p)
      Returns the axis with the largest absolute value