Package org.robwork.sdurw_geometry
Class OBBFactory_f
- java.lang.Object
-
- org.robwork.sdurw_geometry.BVFactoryOBB_f
-
- org.robwork.sdurw_geometry.OBBFactory_f
-
public class OBBFactory_f extends BVFactoryOBB_f
factory for computing tight fitting Oriented Bounding Boxes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OBBFactory_f.FitMethod
The supported methods to generate an oriented bounding box from a mesh.
-
Constructor Summary
Constructors Constructor Description OBBFactory_f()
Constructor.OBBFactory_f(long cPtr, boolean cMemoryOwn)
OBBFactory_f(OBBFactory_f.FitMethod method)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(OBBFactory_f obj)
OBB_f
makeBV(GeometryData geom)
&)OBB_f
makeBV(Primitive geom)
&)OBB_f
makeBV(Shell geom)
&)OBB_f
makeBV(TriMesh geom)
&)OBB_f
makeDITO(TriMesh mesh)
OBB_f
makePCA(TriMesh mesh)
computes covariance over vertices in mesh and calculates the
eigen vectors of the covariance and use this as axes in the bounding boxOBB_f
makePCAHull(TriMesh mesh)
computes covariance over the vertices of the convex hull
of the mesh and calculates the
eigen vectors of the covariance and use this as axes in the bounding box-
Methods inherited from class org.robwork.sdurw_geometry.BVFactoryOBB_f
getCPtr
-
-
-
-
Constructor Detail
-
OBBFactory_f
public OBBFactory_f(long cPtr, boolean cMemoryOwn)
-
OBBFactory_f
public OBBFactory_f(OBBFactory_f.FitMethod method)
Constructor.- Parameters:
method
- [in] (optional) the method to use. Default is the DITO14 method.
-
OBBFactory_f
public OBBFactory_f()
Constructor.
-
-
Method Detail
-
getCPtr
public static long getCPtr(OBBFactory_f obj)
-
delete
public void delete()
- Overrides:
delete
in classBVFactoryOBB_f
-
makeBV
public OBB_f makeBV(TriMesh geom)
&)- Overrides:
makeBV
in classBVFactoryOBB_f
- Parameters:
geom
- [in/out] the mesh to create bounding volume for.- Returns:
- the bounding volume.
-
makeBV
public OBB_f makeBV(GeometryData geom)
&)- Overrides:
makeBV
in classBVFactoryOBB_f
- Parameters:
geom
- [in/out] the geometry to create bounding volume for.- Returns:
- the bounding volume.
-
makeBV
public OBB_f makeBV(Primitive geom)
&)- Overrides:
makeBV
in classBVFactoryOBB_f
- Parameters:
geom
- [in/out] the primitive to create bounding volume for.- Returns:
- the bounding volume.
-
makeBV
public OBB_f makeBV(Shell geom)
&)- Overrides:
makeBV
in classBVFactoryOBB_f
- Parameters:
geom
- [in/out] the shell to create bounding volume for.- Returns:
- the bounding volume.
-
makePCA
public OBB_f makePCA(TriMesh mesh)
computes covariance over vertices in mesh and calculates the
eigen vectors of the covariance and use this as axes in the bounding box- Parameters:
mesh
- [in] the triangle mesh to create oriented bounding box for.- Returns:
- a tight fitting bounding box
-
makePCAHull
public OBB_f makePCAHull(TriMesh mesh)
computes covariance over the vertices of the convex hull
of the mesh and calculates the
eigen vectors of the covariance and use this as axes in the bounding box- Parameters:
mesh
- [in] the triangle mesh to create oriented bounding box for.- Returns:
- a tight fitting bounding box
-
-