Class OBB
Defined in File obb.h
Class Documentation
-
class OBB
Represents an oriented bounding box.
Public Functions
-
OBB()
Initialize an oriented bounding box at position 0, with 0 extents and identity orientation.
-
OBB(const Eigen::Isometry3d &pose, const Eigen::Vector3d &extents)
-
virtual ~OBB()
-
void setPoseAndExtents(const Eigen::Isometry3d &pose, const Eigen::Vector3d &extents)
Set both the pose and extents of the OBB.
-
void getExtents(Eigen::Vector3d &extents) const
Get the extents of the OBB.
- Parameters:
extents – [out] The extents.
-
OBB *extendApprox(const OBB &box)
Add the other OBB to this one and compute an approximate enclosing OBB.
- Parameters:
box – The other box to add.
- Returns:
Pointer to this OBB after the update.
-
bool contains(const Eigen::Vector3d &point) const
Check if this OBB contains the given point.
- Parameters:
point – The point to check.
- Returns:
Whether the point is inside or not.
-
bool overlaps(const OBB &other) const
Check whether this and the given OBBs have nonempty intersection.
- Parameters:
other – The other OBB to check.
- Returns:
Whether the OBBs overlap.
Protected Attributes
-
std::unique_ptr<OBBPrivate> obb_
PIMPL pointer.
-
OBB()