Package org.robwork.sdurw_geometry
Class OBBFactory
- java.lang.Object
-
- org.robwork.sdurw_geometry.BVFactoryOBB
-
- org.robwork.sdurw_geometry.OBBFactory
-
public class OBBFactory extends BVFactoryOBB
factory for computing tight fitting Oriented Bounding Boxes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOBBFactory.FitMethodThe supported methods to generate an oriented bounding box from a mesh.
-
Constructor Summary
Constructors Constructor Description OBBFactory()Constructor.OBBFactory(long cPtr, boolean cMemoryOwn)OBBFactory(OBBFactory.FitMethod method)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()static longgetCPtr(OBBFactory obj)OBBmakeBV(GeometryData geom)&)OBBmakeBV(Primitive geom)&)OBBmakeBV(Shell geom)&)OBBmakeBV(TriMesh geom)&)OBBmakeDITO(TriMesh mesh)OBBmakePCA(TriMesh mesh)computes covariance over vertices in mesh and calculates the
eigen vectors of the covariance and use this as axes in the bounding boxOBBmakePCAHull(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
getCPtr
-
-
-
-
Constructor Detail
-
OBBFactory
public OBBFactory(long cPtr, boolean cMemoryOwn)
-
OBBFactory
public OBBFactory(OBBFactory.FitMethod method)
Constructor.- Parameters:
method- [in] (optional) the method to use. Default is the DITO14 method.
-
OBBFactory
public OBBFactory()
Constructor.
-
-
Method Detail
-
getCPtr
public static long getCPtr(OBBFactory obj)
-
delete
public void delete()
- Overrides:
deletein classBVFactoryOBB
-
makeBV
public OBB makeBV(TriMesh geom)
&)- Overrides:
makeBVin classBVFactoryOBB- Parameters:
geom- [in/out] the mesh to create bounding volume for.- Returns:
- the bounding volume.
-
makeBV
public OBB makeBV(GeometryData geom)
&)- Overrides:
makeBVin classBVFactoryOBB- Parameters:
geom- [in/out] the geometry to create bounding volume for.- Returns:
- the bounding volume.
-
makeBV
public OBB makeBV(Primitive geom)
&)- Overrides:
makeBVin classBVFactoryOBB- Parameters:
geom- [in/out] the primitive to create bounding volume for.- Returns:
- the bounding volume.
-
makeBV
public OBB makeBV(Shell geom)
&)- Overrides:
makeBVin classBVFactoryOBB- Parameters:
geom- [in/out] the shell to create bounding volume for.- Returns:
- the bounding volume.
-
makePCA
public OBB 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 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
-
-