Class UtilVector3D_F32

java.lang.Object
georegression.geometry.UtilVector3D_F32

@Generated("georegression.geometry.UtilVector3D_F64") public class UtilVector3D_F32 extends Object
  • Constructor Details

    • UtilVector3D_F32

      public UtilVector3D_F32()
  • Method Details

    • createRandom

      public static Vector3D_F32 createRandom(float min, float max, Random rand)
      Creates a random vector where each axis is selected from a uniform distribution.
      Parameters:
      min - minimum value
      max - maximum value
      rand - random number generator
      Returns:
      the new random vector
    • perpendicularCanonical

      public static Vector3D_F32 perpendicularCanonical(Vector3D_F32 A, @Nullable @Nullable Vector3D_F32 output)
      Selects a vector which will be perpendicular.
      Parameters:
      A - (Input) A vector
      output - (Optional) storage for output
      Returns:
      Perpendicular vector
    • isIdentical

      public static boolean isIdentical(Vector3D_F32 a, Vector3D_F32 b, float tol)
      Checks to see if the two vectors are identical to within tolerance. Each axis is checked individually.
      Parameters:
      a - First vector.
      b - Second vector.
      tol - Tolerance for equality.
      Returns:
      true if identical and false if not.
    • normalize

      public static void normalize(Vector3D_F32 v)
      Rescales the vector such that its normal is equal to one.
      Parameters:
      v - Vector being normalized.
    • createMatrix

      public static org.ejml.data.FMatrixRMaj createMatrix(@Nullable @Nullable org.ejml.data.FMatrixRMaj R, Vector3D_F32... v)
      Creates a matrix from the set of column vectors. Each vector is a column in the new matrix.
      Parameters:
      v - Set of vectors. Not modified.
      R - If not null the vectors are stored here.
      Returns:
      Matrix.
    • convert

      public static Vector3D_F32 convert(org.ejml.data.FMatrixRMaj m)
      Converts matrices into vectors. All matrices must be vectors with 3 elements.
      Parameters:
      m - A 3x1 or 1x3 matrix
      Returns:
      Equivalent 3D vector
    • acute

      public static float acute(GeoTuple3D_F32 a, GeoTuple3D_F32 b)
      Returns the acute angle between the two vectors. Computed using the dot product.
      Parameters:
      a - vector
      b - vector
      Returns:
      acute angle
    • axisMaxMag

      public static int axisMaxMag(GeoTuple3D_F32<?> v)
      Finds which axis in `v` has the largest magnitude