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

EigenSTL::vector_Vector3d computeVertices () const
 Compute coordinates of the 8 vertices of this OBB. More...
 
bool contains (const Eigen::Vector3d &point) const
 Check if this OBB contains the given point. More...
 
bool contains (const OBB &obb) const
 Check if this OBB contains whole other OBB. 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 ()
 Initialize an oriented bounding box at position 0, with 0 extents and identity orientation. More...
 
 OBB (const Eigen::Isometry3d &pose, const Eigen::Vector3d &extents)
 
 OBB (const OBB &other)
 
OBBoperator= (const OBB &other)
 
bool overlaps (const OBB &other) const
 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 85 of file obb.h.

Constructor & Destructor Documentation

◆ OBB() [1/3]

bodies::OBB::OBB ( )

Initialize an oriented bounding box at position 0, with 0 extents and identity orientation.

Definition at line 43 of file obb.cpp.

◆ OBB() [2/3]

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

Definition at line 60 of file obb.cpp.

◆ OBB() [3/3]

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

Definition at line 65 of file obb.cpp.

◆ ~OBB()

bodies::OBB::~OBB ( )
virtualdefault

Member Function Documentation

◆ computeVertices()

EigenSTL::vector_Vector3d bodies::OBB::computeVertices ( ) const

Compute coordinates of the 8 vertices of this OBB.

Returns
The vertices.

Definition at line 169 of file obb.cpp.

◆ contains() [1/2]

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

Check if this OBB contains the given point.

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

Definition at line 159 of file obb.cpp.

◆ contains() [2/2]

bool bodies::OBB::contains ( const OBB obb) const

Check if this OBB contains whole other OBB.

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

Definition at line 194 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 138 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 99 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 94 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 119 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 106 of file obb.cpp.

◆ operator=()

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

Definition at line 71 of file obb.cpp.

◆ overlaps()

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

Check whether this and the given OBBs have nonempty intersection.

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

Definition at line 164 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 77 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 126 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 133 of file obb.cpp.

Member Data Documentation

◆ obb_

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

PIMPL pointer.

Definition at line 176 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 Sun Oct 1 2023 02:40:16