Module pointcloud

Class Utils

java.lang.Object
de.grogra.pointcloud.tools.Utils

public class Utils extends Object
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • getDistanceToPoint

      public static double getDistanceToPoint(Cloud.Point p1, Cloud.Point p2)
      Returns the distance between p1 and the given point p2. The distance is calculated with the pythagorean theorem.
      Parameters:
      point - The other point
      Returns:
      The distance between this point and the given point. Or -1 if one the of two points do not have a 3d corrdinate
    • getDistanceToPoint

      public static double getDistanceToPoint(Cloud.Point p1, Vector3f v2)
      Returns the distance between p1 and the given vector v2. The distance is calculated with the pythagorean theorem.
      Parameters:
      point - The other point
      Returns:
      The distance between this point and the given point. Or -1 if one the of two points do not have a 3d corrdinate
    • getDistanceToLine

      public static double getDistanceToLine(Cloud.Point p1, ClusterVector position, ClusterVector direction)
      Returns the distance between the point p1 and the given line (represented by a position vector and a direction vector).
      Parameters:
      position - The position vector of the line
      direction - The direction vector of the line
      Returns:
      The distance between this point and that line
    • getDistanceToPlane

      public static double getDistanceToPlane(Cloud.Point p1, ClusterVector position, ClusterVector normal)
      Returns the distance between point p1 and the given plane (represented by a position vector and a normal vector).
      Parameters:
      position - The position vector of the plane
      normal - The normal vector of the plane
      Returns:
      The distance between this point and that plane
    • getSignedDistanceToPlane

      public static double getSignedDistanceToPlane(Cloud.Point p1, ClusterVector position, ClusterVector normal)
      Returns the signed distance between point p1 and the given plane (represented by a position vector and a normal vector). Signed means that the distance is negative if the point is below the plane and the distance is positive if the point is above the plane.
      Parameters:
      position - The position vector of the plane
      normal - The normal vector of the plane
      Returns:
      The signed distance between this point and that plane
    • addCoordinates

      public static void addCoordinates(Cloud.Point p1, Cloud.Point p2)