Package org.robwork.sdurw_geometry
Class DistanceUtil
- java.lang.Object
-
- org.robwork.sdurw_geometry.DistanceUtil
-
public class DistanceUtil extends java.lang.Object
a class for performing distance calculations between different
geometric primitives
-
-
Constructor Summary
Constructors Constructor Description DistanceUtil()
DistanceUtil(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static double
distanceLineLine(Vector3D p1, Vector3D p2, Vector3D q1, Vector3D q2)
computes the euclidean distance between line segments (line(p1,p2),line(q1,q2))static double
distanceLineLineSqr(Vector3D p1, Vector3D p2, Vector3D q1, Vector3D q2)
computes the squared euclidean distance between line segments
(line(p1,p2),line(q1,q2))static long
getCPtr(DistanceUtil obj)
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(DistanceUtil obj)
-
delete
public void delete()
-
distanceLineLineSqr
public static double distanceLineLineSqr(Vector3D p1, Vector3D p2, Vector3D q1, Vector3D q2)
computes the squared euclidean distance between line segments
(line(p1,p2),line(q1,q2))- Parameters:
p1
- [in] start point on line segment 1p2
- [in] end point on line segment 1q1
- [in] start point on line segment 2q2
- [in] end point on line segment 2- Returns:
- distance between line segments
-
distanceLineLine
public static double distanceLineLine(Vector3D p1, Vector3D p2, Vector3D q1, Vector3D q2)
computes the euclidean distance between line segments (line(p1,p2),line(q1,q2))- Parameters:
p1
- [in] start point on line segment 1p2
- [in] end point on line segment 1q1
- [in] start point on line segment 2q2
- [in] end point on line segment 2- Returns:
- distance between line segments
-
-