RobWorkProject  23.9.11-
Public Types | Public Member Functions | List of all members
OBBFactory< T > Class Template Reference

factory for computing tight fitting Oriented Bounding Boxes. More...

#include <OBBFactory.hpp>

Inherits BVFactory< OBB< double > >.

Public Types

enum  FitMethod { PCA , PCAHull , DITO14 }
 The supported methods to generate an oriented bounding box from a mesh. More...
 
- Public Types inherited from BVFactory< OBB< double > >
typedef rw::core::Ptr< BVFactory< OBB< double > > > Ptr
 Smart pointer type to BVFactory<BV>.
 

Public Member Functions

 OBBFactory (FitMethod method=DITO14)
 Constructor. More...
 
virtual ~OBBFactory ()
 Destructor.
 
virtual rw::geometry::OBB< T > makeBV (rw::geometry::TriMesh &geom)
 Create a bounding volume for a triangle mesh. More...
 
rw::geometry::OBB< T > makeBV (rw::geometry::GeometryData &geom)
 Create a bounding volume for any type of geometry. More...
 
rw::geometry::OBB< T > makeBV (rw::geometry::Primitive &geom)
 Create a bounding volume for a primitive. More...
 
rw::geometry::OBB< T > makeDITO (const rw::geometry::TriMesh &mesh) const
 
rw::geometry::OBB< T > makeBV (rw::geometry::Shell &geom)
 Create a bounding volume for a shell. More...
 
rw::geometry::OBB< T > makePCA (const rw::geometry::TriMesh &mesh) const
 computes covariance over vertices in mesh and calculates the eigen vectors of the covariance and use this as axes in the bounding box More...
 
rw::geometry::OBB< T > makePCAHull (const rw::geometry::TriMesh &mesh) const
 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 More...
 
- Public Member Functions inherited from BVFactory< OBB< double > >
virtual ~BVFactory ()
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from BVFactory< OBB< double > >
 BVFactory ()
 Constructor.
 

Detailed Description

template<class T = double>
class rw::geometry::OBBFactory< T >

factory for computing tight fitting Oriented Bounding Boxes.

Member Enumeration Documentation

◆ FitMethod

enum FitMethod

The supported methods to generate an oriented bounding box from a mesh.

Enumerator
PCA 

Principal Component Analysis.

PCAHull 

Principal Component Analysis Hull.

DITO14 

Ditretahedron method with 14 selected vertices.

Constructor & Destructor Documentation

◆ OBBFactory()

OBBFactory ( FitMethod  method = DITO14)
inline

Constructor.

Parameters
method[in] (optional) the method to use. Default is the DITO14 method.

Member Function Documentation

◆ makeBV() [1/4]

rw::geometry::OBB<T> makeBV ( rw::geometry::GeometryData geom)
inlinevirtual

Create a bounding volume for any type of geometry.

Parameters
geom[in/out] the geometry to create bounding volume for.
Returns
the bounding volume.

Implements BVFactory< OBB< double > >.

◆ makeBV() [2/4]

rw::geometry::OBB<T> makeBV ( rw::geometry::Primitive geom)
inlinevirtual

Create a bounding volume for a primitive.

Parameters
geom[in/out] the primitive to create bounding volume for.
Returns
the bounding volume.

Implements BVFactory< OBB< double > >.

◆ makeBV() [3/4]

rw::geometry::OBB<T> makeBV ( rw::geometry::Shell geom)
inlinevirtual

Create a bounding volume for a shell.

Parameters
geom[in/out] the shell to create bounding volume for.
Returns
the bounding volume.

Implements BVFactory< OBB< double > >.

◆ makeBV() [4/4]

virtual rw::geometry::OBB<T> makeBV ( rw::geometry::TriMesh geom)
inlinevirtual

Create a bounding volume for a triangle mesh.

Parameters
geom[in/out] the mesh to create bounding volume for.
Returns
the bounding volume.

Implements BVFactory< OBB< double > >.

◆ makePCA()

rw::geometry::OBB< T > makePCA ( const rw::geometry::TriMesh mesh) const

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()

rw::geometry::OBB< T > makePCAHull ( const rw::geometry::TriMesh mesh) const

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

The documentation for this class was generated from the following file: