Class UtilPlane3D_F64

java.lang.Object
georegression.geometry.UtilPlane3D_F64

public class UtilPlane3D_F64 extends Object
  • Constructor Details

    • UtilPlane3D_F64

      public UtilPlane3D_F64()
  • Method Details

    • convert

      public static PlaneGeneral3D_F64 convert(PlaneNormal3D_F64 input, @Nullable @Nullable PlaneGeneral3D_F64 output)
      Converts a plane in normal form into a general equation
      Parameters:
      input - Plane in normal form.
      output - (Optional) Storage for output plane in general form. If null a new instance will be declared.
      Returns:
      The convert plane in general form.
    • convert

      public static PlaneNormal3D_F64 convert(PlaneGeneral3D_F64 input, @Nullable @Nullable PlaneNormal3D_F64 output)

      Converts a plane in general form into normal form. The point on the plane in normal form will be the closest point to the origin.

      NOTE: The normal is not normalized.

      Parameters:
      input - Plane in general form.
      output - (Optional) Storage for output plane in normal form. If null a new instance will be declared.
      Returns:
      The plane in normal form.
    • convert

      public static PlaneNormal3D_F64 convert(PlaneTangent3D_F64 input, @Nullable @Nullable PlaneNormal3D_F64 output)
      Converts a plane in tangent form into a plane in normal form
      Parameters:
      input - Plane in tangent form.
      output - (Optional) Storage for output plane in normal form. If null a new instance will be declared.
      Returns:
      The convert plane in general form.
    • convert

      public static PlaneNormal3D_F64 convert(Se3_F64 planeToWorld, @Nullable @Nullable PlaneNormal3D_F64 output)
      Defines a plane using a 3D rigid body transform. +z is the 3rd column the rotation matrix. The plane's point is the translation. The plane reference frame is the x-y plane.
      Parameters:
      planeToWorld - (Input) SE3 transform from the plane into the "world" frame.
      output - (Output) Plane
      Returns:
      Plane
    • hessianNormalForm

      public static void hessianNormalForm(PlaneGeneral3D_F64 plane)
      Converts the plane into Hessian normal form. This is done by dividing each coefficient by the Euclidean norm of (A,B,C).
      Parameters:
      plane - The input plane. Modified.
    • evaluate

      public static double evaluate(PlaneGeneral3D_F64 plane, Point3D_F64 point)
      Applies the plane's definition to test to see if a point is one the plane
      Parameters:
      plane - Equation of the plane
      point - Equation of the point.
      Returns:
      zero if the point is one the plane.
    • evaluate

      public static double evaluate(PlaneNormal3D_F64 plane, Point3D_F64 point)
      Applies the plane's definition to test to see if a point is one the plane
      Parameters:
      plane - Equation of the plane
      point - Equation of the point.
      Returns:
      zero if the point is one the plane.
    • selectAxis2D

      public static void selectAxis2D(Vector3D_F64 normal, Vector3D_F64 axisX, Vector3D_F64 axisY)
      There are an infinite number of possible 2D coordinate axises for a plane. This selects one which will be right handed using UtilVector3D_F64.perpendicularCanonical(Vector3D_F64, Vector3D_F64) and a cross product.
      Parameters:
      normal - (Input) The plane's normal or z-axis
      axisX - (Output) Selected x-axis. Normalized
      axisY - (output) Selected y-axis. Normalized
    • point3Dto2D

      public static void point3Dto2D(Point3D_F64 pointOnPlane, Vector3D_F64 axisX, Vector3D_F64 axisY, Point3D_F64 A, Point2D_F64 output)
      Projects the point onto the 2D coordinate system specified by the provided x-axis. If the chose of x-axis is arbitrary UtilVector3D_F64.perpendicularCanonical(Vector3D_F64, Vector3D_F64) is recommended as a way to select
      Parameters:
      pointOnPlane - (Input) A point on the plane.
      axisX - (Input) Vector which defines the x-axis
      axisY - (Input) Vector which defines the y-axis
      A - (Input) 3D vector you wish to project. MUST BE ON THE PlANE
      output - (Output) 2D projected vector.
    • point2Dto3D

      public static void point2Dto3D(Point3D_F64 origin, Vector3D_F64 axisX, Vector3D_F64 axisY, Point2D_F64 A, Point3D_F64 output)
      Given a point on the plane's 2D coordinate system, convert it back into a 3D point.
      Parameters:
      origin - (Input) Point that defines the 2D coordinate system's origin.
      axisX - (Input) axis which defines the 2D x-axis
      axisY - (Input) axis which defines the 2D y-axis
      A - (Input) 2D point that is to be converted
      output - (Output) 3D point
    • equals

      public static boolean equals(PlaneNormal3D_F64 a, PlaneNormal3D_F64 b, double tol)
      Returns true if the two plane equations are equal to within tolerance. Planes are converted into generalized format and normalized to take in account scale ambiguity.
      Parameters:
      a - plane
      b - plane
      tol - Tolerance for equality
      Returns:
      true if equals and false if not
    • planeToWorld

      public static Se3_F64 planeToWorld(PlaneGeneral3D_F64 plane, @Nullable @Nullable Se3_F64 planeToWorld)
      Creates a transform from the plane's reference frame into world's reference frame. The z-axis is set to the plane's normal and the x-axis and y-axis are arbitrarily choosen. Points which lie along the plane will lie along its x-y plane.
      Parameters:
      plane - Plane
      planeToWorld - (Optional) storage for the planeToWorld transform. Can be null.
      Returns:
      Transform from planeToWorld
    • planeToWorld

      public static Se3_F64 planeToWorld(PlaneGeneral3D_F64 plane, Vector3D_F64 axisX, Vector3D_F64 axisY, Vector3D_F64 axisZ, @Nullable @Nullable Se3_F64 planeToWorld)