Class UtilPoint3D_F32

java.lang.Object
georegression.geometry.UtilPoint3D_F32

@Generated("georegression.geometry.UtilPoint3D_F64") public class UtilPoint3D_F32 extends Object
  • Constructor Details

    • UtilPoint3D_F32

      public UtilPoint3D_F32()
  • Method Details

    • findClosestIdx

      public static int findClosestIdx(float x, float y, float z, List<Point3D_F32> pts, float 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 float distance(float x0, float y0, float z0, float x1, float y1, float 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 float distanceSq(float x0, float y0, float z0, float x1, float y1, float 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 float norm(float x, float y, float z)
    • copy

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

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

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

      public static List<Point3D_F32> random(PlaneNormal3D_F32 plane, float 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_F32> randomNormals(PlaneNormal3D_F32 plane, float max, int num, Random rand)
    • random

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

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

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

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

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

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

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

      public static Point3D_F32 mean(List<Point3D_F32> points, @Nullable @Nullable Point3D_F32 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_F32 mean(List<Point3D_F32> points, int num, @Nullable @Nullable Point3D_F32 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_F32> points, Box3D_F32 bounding)
      Finds the minimal volume Box3D_F32 which contains all the points.
      Parameters:
      points - Input: List of points.
      bounding - Output: Bounding box
    • axisLargestAbs

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