Package org.robwork.sdurw_geometry
Class DistanceUtilPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.DistanceUtilPtr
-
public class DistanceUtilPtr extends java.lang.Object
Ptr 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.DistanceUtilCPtr
cptr()
void
delete()
DistanceUtil
deref()
The pointer stored in the object.double
distanceLineLine(Vector3D p1, Vector3D p2, Vector3D q1, Vector3D q2)
computes the euclidean distance between line segments (line(p1,p2),line(q1,q2))double
distanceLineLineSqr(Vector3D p1, Vector3D p2, Vector3D q1, Vector3D q2)
computes the squared euclidean distance between line segments
(line(p1,p2),line(q1,q2))boolean
equals(DistanceUtil p)
static long
getCPtr(DistanceUtilPtr obj)
DistanceUtil
getDeref()
Member access operator.boolean
isNull()
checks if the pointer is nullboolean
isShared()
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
-
-