Package org.robwork.sdurw_geometry
Class QHull3D
- java.lang.Object
-
- org.robwork.sdurw_geometry.ConvexHull3D
-
- org.robwork.sdurw_geometry.QHull3D
-
public class QHull3D extends ConvexHull3D
calculates the convex hull of a set of 3d points.
The GiftWrap convex hull algorithm is used, hence the
class name.
Note: It is important that there are not multiple vertices at the same coordinates.
Filter these away before using this convex hull calculation.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(QHull3D obj)
double
getMinDistInside(Vector3D vertex)
If the vertex is inside the convex hull the minimum distance
to any of the half-spaces of the hull is returned.double
getMinDistOutside(Vector3D vertex)
If the vertex is outside the convex hull the minimum distance
to the convex hull is returned.SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t
getPlaneNormals()
Returns the normals of the planes defining the convex hullvector_d
getPlaneOffsets()
Returns the offsets of the planes defining the convex hullSWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t
getVertices()
Returns the vertices defining the convex hullboolean
isInside(Vector3D vertex)
test if the given vertex is inside the convex hullvoid
rebuild(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t vertices)
rebuilts the hullPlainTriMeshN1Ptr
toTriMesh()
create a plain trimesh from the hull facets-
Methods inherited from class org.robwork.sdurw_geometry.ConvexHull3D
getCPtr
-
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(QHull3D obj)
-
delete
public void delete()
- Overrides:
delete
in classConvexHull3D
-
rebuild
public void rebuild(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t vertices)
Description copied from class:ConvexHull3D
rebuilts the hull- Overrides:
rebuild
in classConvexHull3D
-
isInside
public boolean isInside(Vector3D vertex)
Description copied from class:ConvexHull3D
test if the given vertex is inside the convex hull- Overrides:
isInside
in classConvexHull3D
-
getMinDistOutside
public double getMinDistOutside(Vector3D vertex)
Description copied from class:ConvexHull3D
If the vertex is outside the convex hull the minimum distance
to the convex hull is returned. If its not outside 0 is returned.- Overrides:
getMinDistOutside
in classConvexHull3D
- Parameters:
vertex
-- Returns:
- minimum distance to vertex
-
getMinDistInside
public double getMinDistInside(Vector3D vertex)
Description copied from class:ConvexHull3D
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.- Overrides:
getMinDistInside
in classConvexHull3D
- Parameters:
vertex
-- Returns:
- minimum distance to vertex
-
toTriMesh
public PlainTriMeshN1Ptr toTriMesh()
Description copied from class:ConvexHull3D
create a plain trimesh from the hull facets- Overrides:
toTriMesh
in classConvexHull3D
- Returns:
- the hull facets as a plain triangle mesh with normal information
-
getVertices
public SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t getVertices()
Returns the vertices defining the convex hull
-
getPlaneNormals
public SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t getPlaneNormals()
Returns the normals of the planes defining the convex hull
-
getPlaneOffsets
public vector_d getPlaneOffsets()
Returns the offsets of the planes defining the convex hull
-
-