Package org.robwork.sdurw_geometry
Class ConvexHull2DPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.ConvexHull2DPtr
-
public class ConvexHull2DPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description ConvexHull2DPtr()Default constructor yielding a NULL-pointer.ConvexHull2DPtr(long cPtr, boolean cMemoryOwn)ConvexHull2DPtr(ConvexHull2D 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 ConvexHull2D__ref__()Dereferencing operator.ConvexHull2DCPtrcptr()voiddelete()ConvexHull2Dderef()The pointer stored in the object.booleanequals(ConvexHull2D p)static longgetCPtr(ConvexHull2DPtr obj)ConvexHull2DgetDeref()Member access operator.doublegetMinDist(Vector2D vertex)if the vertex is inside the convex hull the minimum distance
to any of the half-spaces of the hull is returned.booleanisInside(Vector2D vertex)test if the given vertex is inside the convex hullbooleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipvoidrebuild(SWIGTYPE_p_std__vectorT_rw__math__Vector2DT_double_t_t vertices)rebuilts the hullSWIGTYPE_p_std__vectorT_rw__math__Vector2DT_double_t_ttoContour()create a plain trimesh from the hull facets
-
-
-
Constructor Detail
-
ConvexHull2DPtr
public ConvexHull2DPtr(long cPtr, boolean cMemoryOwn)
-
ConvexHull2DPtr
public ConvexHull2DPtr()
Default constructor yielding a NULL-pointer.
-
ConvexHull2DPtr
public ConvexHull2DPtr(ConvexHull2D ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(ConvexHull2DPtr obj)
-
delete
public void delete()
-
deref
public ConvexHull2D deref()
The pointer stored in the object.
-
__ref__
public ConvexHull2D __ref__()
Dereferencing operator.
-
getDeref
public ConvexHull2D getDeref()
Member access operator.
-
equals
public boolean equals(ConvexHull2D 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 ConvexHull2DCPtr cptr()
-
rebuild
public void rebuild(SWIGTYPE_p_std__vectorT_rw__math__Vector2DT_double_t_t vertices)
rebuilts the hull- Parameters:
vertices-
-
isInside
public boolean isInside(Vector2D vertex)
test if the given vertex is inside the convex hull
-
getMinDist
public double getMinDist(Vector2D vertex)
if the vertex is inside the convex hull the minimum distance
to any of the half-spaces of the hull is returned. If its not inside
0 is returned.- Parameters:
vertex-- Returns:
- minimum distance to vertex
-
toContour
public SWIGTYPE_p_std__vectorT_rw__math__Vector2DT_double_t_t toContour()
create a plain trimesh from the hull facets- Returns:
- the hull facets as a plain triangle mesh with normal information
-
-