Package org.robwork.sdurw_geometry
Class ConvexHull2D
- java.lang.Object
-
- org.robwork.sdurw_geometry.ConvexHull2D
-
public class ConvexHull2D extends java.lang.Object
interface for convexhull calculators on 2d point sets
-
-
Constructor Summary
Constructors Constructor Description ConvexHull2D(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(ConvexHull2D obj)
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.boolean
isInside(Vector2D vertex)
test if the given vertex is inside the convex hullvoid
rebuild(SWIGTYPE_p_std__vectorT_rw__math__Vector2DT_double_t_t vertices)
rebuilts the hullSWIGTYPE_p_std__vectorT_rw__math__Vector2DT_double_t_t
toContour()
create a plain trimesh from the hull facets
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(ConvexHull2D obj)
-
delete
public void delete()
-
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
-
-