java.lang.Object
de.grogra.pointcloud.tools.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCoordinates
(Cloud.Point p1, Cloud.Point p2) 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).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).static double
getDistanceToPoint
(Cloud.Point p1, Cloud.Point p2) Returns the distance between p1 and the given point p2.static double
getDistanceToPoint
(Cloud.Point p1, Vector3f v2) Returns the distance between p1 and the given vector v2.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).
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
getDistanceToPoint
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
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 linedirection
- 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 planenormal
- 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 planenormal
- The normal vector of the plane- Returns:
- The signed distance between this point and that plane
-
addCoordinates
-