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 voiddelete()static longgetCPtr(QHull3D obj)doublegetMinDistInside(Vector3D vertex)If the vertex is inside the convex hull the minimum distance
to any of the half-spaces of the hull is returned.doublegetMinDistOutside(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_tgetPlaneNormals()Returns the normals of the planes defining the convex hullvector_dgetPlaneOffsets()Returns the offsets of the planes defining the convex hullSWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_tgetVertices()Returns the vertices defining the convex hullbooleanisInside(Vector3D vertex)test if the given vertex is inside the convex hullvoidrebuild(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t vertices)rebuilts the hullPlainTriMeshN1PtrtoTriMesh()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:
deletein classConvexHull3D
-
rebuild
public void rebuild(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t vertices)
Description copied from class:ConvexHull3Drebuilts the hull- Overrides:
rebuildin classConvexHull3D
-
isInside
public boolean isInside(Vector3D vertex)
Description copied from class:ConvexHull3Dtest if the given vertex is inside the convex hull- Overrides:
isInsidein classConvexHull3D
-
getMinDistOutside
public double getMinDistOutside(Vector3D vertex)
Description copied from class:ConvexHull3DIf the vertex is outside the convex hull the minimum distance
to the convex hull is returned. If its not outside 0 is returned.- Overrides:
getMinDistOutsidein classConvexHull3D- Parameters:
vertex-- Returns:
- minimum distance to vertex
-
getMinDistInside
public double getMinDistInside(Vector3D vertex)
Description copied from class:ConvexHull3DIf 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:
getMinDistInsidein classConvexHull3D- Parameters:
vertex-- Returns:
- minimum distance to vertex
-
toTriMesh
public PlainTriMeshN1Ptr toTriMesh()
Description copied from class:ConvexHull3Dcreate a plain trimesh from the hull facets- Overrides:
toTriMeshin 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
-
-