Public Member Functions | Protected Attributes | List of all members
bodies::OBB Class Reference

Represents an oriented bounding box. More...

#include <obb.h>

Public Member Functions

bool contains (const Eigen::Vector3d &point)
 Check if this OBB contains the given point. More...
 
OBBextendApprox (const OBB &box)
 Add the other OBB to this one and compute an approximate enclosing OBB. More...
 
Eigen::Vector3d getExtents () const
 Get the extents of the OBB. More...
 
void getExtents (Eigen::Vector3d &extents) const
 Get the extents of the OBB. More...
 
Eigen::Isometry3d getPose () const
 Get the pose of the OBB. More...
 
void getPose (Eigen::Isometry3d &pose) const
 Get The pose of the OBB. More...
 
 OBB ()
 
 OBB (const Eigen::Isometry3d &pose, const Eigen::Vector3d &extents)
 
 OBB (const OBB &other)
 
OBBoperator= (const OBB &other)
 
bool overlaps (const OBB &other)
 Check whether this and the given OBBs have nonempty intersection. More...
 
void setPoseAndExtents (const Eigen::Isometry3d &pose, const Eigen::Vector3d &extents)
 Set both the pose and extents of the OBB. More...
 
AABB toAABB () const
 Convert this OBB to an axis-aligned BB. More...
 
void toAABB (AABB &aabb) const
 Convert this OBB to an axis-aligned BB. More...
 
virtual ~OBB ()
 

Protected Attributes

std::unique_ptr< OBBPrivateobb_
 PIMPL pointer. More...
 

Detailed Description

Represents an oriented bounding box.

Definition at line 84 of file obb.h.

Constructor & Destructor Documentation

◆ OBB() [1/3]

bodies::OBB::OBB ( )

Definition at line 43 of file obb.cpp.

◆ OBB() [2/3]

bodies::OBB::OBB ( const OBB other)

Definition at line 48 of file obb.cpp.

◆ OBB() [3/3]

bodies::OBB::OBB ( const Eigen::Isometry3d &  pose,
const Eigen::Vector3d extents 
)

Definition at line 53 of file obb.cpp.

◆ ~OBB()

bodies::OBB::~OBB ( )
virtualdefault

Member Function Documentation

◆ contains()

bool bodies::OBB::contains ( const Eigen::Vector3d point)

Check if this OBB contains the given point.

Parameters
pointThe point to check.
Returns
Whether the point is inside or not.

Definition at line 139 of file obb.cpp.

◆ extendApprox()

OBB * bodies::OBB::extendApprox ( const OBB box)

Add the other OBB to this one and compute an approximate enclosing OBB.

Parameters
boxThe other box to add.
Returns
Pointer to this OBB after the update.

Definition at line 133 of file obb.cpp.

◆ getExtents() [1/2]

Eigen::Vector3d bodies::OBB::getExtents ( ) const

Get the extents of the OBB.

Returns
The extents.

Definition at line 86 of file obb.cpp.

◆ getExtents() [2/2]

void bodies::OBB::getExtents ( Eigen::Vector3d extents) const

Get the extents of the OBB.

Parameters
extents[out] The extents.

Definition at line 81 of file obb.cpp.

◆ getPose() [1/2]

Eigen::Isometry3d bodies::OBB::getPose ( ) const

Get the pose of the OBB.

Returns
The pose.

Definition at line 114 of file obb.cpp.

◆ getPose() [2/2]

void bodies::OBB::getPose ( Eigen::Isometry3d &  pose) const

Get The pose of the OBB.

Parameters
poseThe pose.

Definition at line 93 of file obb.cpp.

◆ operator=()

OBB & bodies::OBB::operator= ( const OBB other)

Definition at line 58 of file obb.cpp.

◆ overlaps()

bool bodies::OBB::overlaps ( const OBB other)

Check whether this and the given OBBs have nonempty intersection.

Parameters
otherThe other OBB to check.
Returns
Whether the OBBs overlap.

Definition at line 144 of file obb.cpp.

◆ setPoseAndExtents()

void bodies::OBB::setPoseAndExtents ( const Eigen::Isometry3d &  pose,
const Eigen::Vector3d extents 
)

Set both the pose and extents of the OBB.

Parameters
[in]poseNew pose of the OBB.
[in]extentsNew extents of the OBB.

Definition at line 64 of file obb.cpp.

◆ toAABB() [1/2]

AABB bodies::OBB::toAABB ( ) const

Convert this OBB to an axis-aligned BB.

Returns
The AABB.

Definition at line 121 of file obb.cpp.

◆ toAABB() [2/2]

void bodies::OBB::toAABB ( AABB aabb) const

Convert this OBB to an axis-aligned BB.

Parameters
aabbThe AABB.

Definition at line 128 of file obb.cpp.

Member Data Documentation

◆ obb_

std::unique_ptr<OBBPrivate> bodies::OBB::obb_
protected

PIMPL pointer.

Definition at line 160 of file obb.h.


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


geometric_shapes
Author(s): Ioan Sucan , Gil Jones
autogenerated on Fri Apr 1 2022 02:40:31