RobWorkProject  24.8.23-
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
OBB< T > Class Template Reference

class representing an Oriented Bounding Box (OBB) More...

#include <OBB.hpp>

Inherits OBV< OBB< double > >.

Public Types

typedef T value_type
 
- Public Types inherited from OBV< OBB< double > >
typedef OBB< double > DerivedType
 
typedef OBB< double > BVType
 
typedef Traits< OBB< double > >::value_type value_type
 
typedef rw::core::Ptr< OBV< OBB< double > > > Ptr
 

Public Member Functions

 OBB ()
 constructor
 
 OBB (rw::math::Transform3D< T > t3d, rw::math::Vector3D< T > halfLng)
 
const rw::math::Transform3D< T > & getTransform () const
 
void setTransform (rw::math::Transform3D< T > t3d)
 set the transformation of this OBB
 
const rw::math::Vector3D< T > & getHalfLengths () const
 get the halflengths of this OBB
 
void setHalfLengths (const rw::math::Vector3D< T > &halfLng)
 set the halflengths of the OBB
 
calcVolume () const
 calculate the volume of this OBB
 
calcArea () const
 calculates the total area of the box
 
TriMesh::Ptr createMesh (bool local=false) const
 Creates a TriMesh representing the OBB. More...
 
- Public Member Functions inherited from OBV< OBB< double > >
value_type calcArea () const
 
value_type calcVolume () const
 

Static Public Member Functions

static OBB< T > buildTightOBB (const rw::geometry::TriMesh &tris, size_t index=0)
 

Friends

std::ostream & operator<< (std::ostream &os, const OBB< T > &obb)
 Ouputs OBB to stream. More...
 

Detailed Description

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

class representing an Oriented Bounding Box (OBB)

Member Function Documentation

◆ createMesh()

TriMesh::Ptr createMesh ( bool  local = false) const
inline

Creates a TriMesh representing the OBB.

The triangles of the mesh is by default placed in the "global" frame corresponding to the frame in which the OBB is defined. In case the parameter local is set to true, the reference frame will be the frame of the OBB itself.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const OBB< T > &  obb 
)
friend

Ouputs OBB to stream.

Parameters
os[in/out] stream to use
obb[in] oriented bounding box
Returns
the resulting stream

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