Package org.robwork.sdurw_geometry
Class DistanceUtilPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.DistanceUtilPtr
-
public class DistanceUtilPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description DistanceUtilPtr()Default constructor yielding a NULL-pointer.DistanceUtilPtr(long cPtr, boolean cMemoryOwn)DistanceUtilPtr(DistanceUtil ptr)Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DistanceUtil__ref__()Dereferencing operator.DistanceUtilCPtrcptr()voiddelete()DistanceUtilderef()The pointer stored in the object.doubledistanceLineLine(Vector3D p1, Vector3D p2, Vector3D q1, Vector3D q2)computes the euclidean distance between line segments (line(p1,p2),line(q1,q2))doubledistanceLineLineSqr(Vector3D p1, Vector3D p2, Vector3D q1, Vector3D q2)computes the squared euclidean distance between line segments
(line(p1,p2),line(q1,q2))booleanequals(DistanceUtil p)static longgetCPtr(DistanceUtilPtr obj)DistanceUtilgetDeref()Member access operator.booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
DistanceUtilPtr
public DistanceUtilPtr(long cPtr, boolean cMemoryOwn)
-
DistanceUtilPtr
public DistanceUtilPtr()
Default constructor yielding a NULL-pointer.
-
DistanceUtilPtr
public DistanceUtilPtr(DistanceUtil ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(DistanceUtilPtr obj)
-
delete
public void delete()
-
deref
public DistanceUtil deref()
The pointer stored in the object.
-
__ref__
public DistanceUtil __ref__()
Dereferencing operator.
-
getDeref
public DistanceUtil getDeref()
Member access operator.
-
equals
public boolean equals(DistanceUtil p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
cptr
public DistanceUtilCPtr cptr()
-
distanceLineLineSqr
public 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 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
-
-